Big-city police departments and union leaders warned officers Sunday to change up their routines and insist on extra backup after a gunman who had ranted online about the slayings of black men killed two New York police officers sitting in their squad car.