BEIRUT, Lebanon — More than five months after holding parliamentary elections, Lebanon formed a new cabinet on Monday, ending a long period of gridlock that illustrated once again the myriad dysfunctions of this country's bitterly divided political class.