Fixed backups so that they no longer fail when backup size is > 2GB

Fixed backups to correctly write all segments to swift before writing the
manifest. This enables backups of > 2GB to be written to swift.

Change-Id: Ifc72465c4629c2b2eed775aac58509c60354be32
Fixes: bug 1224642
(cherry picked from commit 013c62dc53e0cf15f007796d39ce2a47769dd248)