plainbox:session:storage: handle fsync() failures

This patch adds a try/catch statement around all fsync() calls, logging
all failures but still progressing. Appartently fsync can fail. In
practice I've seen it fail with vmware workstation host-guest filesystem
(raising OSError with EINVAL).

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:session:storage: fix wrong variables

This patch fixes undefined local variables in _save_checkpoint_unix_py33()
tht can happen when overwrite fails for any reason. This is probably the
cause of some of the https://bugs.launchpad.net/plainbox/+bug/1396532
as it would mean we're leaving the session.next file behind.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge of lp:~zkrynicki/checkbox/storage-fixes/ by tarmac [r=kissiel][bug=][author=zkrynicki]"