Libya's rival factions sign up to UN-brokered peace deal