Truce in Syria's last rebel stronghold to begin at midnight, presidents say, after lengthy meeting in Russian capital.