TRIPOLI— Gun battles shut down a neighborhood of central Tripoli on Sunday, as militias loyal to the central government battled another militia that they said had gone rogue. The clashes, which included the exchange of machine gun fire and rocket-propelled grenades, underscored the shakiness of Libya’s security even within the confines of the capital city, where the country’s security forces are headquartered.