Pistons, Dwane Casey agree to 5-year deal