The government and opposition parties in the DR Congo clinch a hard-won deal over President Joseph Kabila's fate, ending a political crisis that sparked months of deadly unrest.