Mexico sent federal agents to take over security in a troubled city in southern Guerrero state after the discovery of a mass grave.