mongo-sync: save last error for future use

Signed-off-by: Budai Laszlo <lbudai@balabit.hu>
Merge branch 'f/last_error_refact'