Libya rival factions sign UN-backed deal to pave way for national elections