Man treated ‘like a dog’ before murder in upstate New York, prosecutor says