President Salva Kiir’s government and the rebels backing Riek Machar have signed a ceasefire deal, a "critical first step" in peace negotiations.