BEIRUT, Lebanon — Bombs exploded outside two Sunni mosques in the city of Tripoli in northern Lebanon on Friday as worshipers were leaving prayers, killing more than two dozen people and wounding hundreds, Lebanese media reported, a major escalation of violence in a country deeply unsettled by the conflict in neighboring Syria.