As navigation apps like Waze and Google Maps direct more motorists onto residential streets, towns are fighting back by creating turn restrictions and even closing roads to outsiders.