Jihadist militants from Islamic State are set to be allowed to withdraw from areas on the outskirts of Damascus under a UN-brokered deal, activists say.