Warring factions in Yemen have exchanged one thousand prisoners under a deal struck last month.