Man allegedly shot and killed homeless person as ‘practice’ before killing ex-wife