mongo-sync: save last error for future use

Signed-off-by: Budai Laszlo <lbudai@balabit.hu>
Merge branch 'f/last_error_refact'
tests: Fix a func test to work without a replica set

When working with a single MongoDB instance, properly skip newly added
tests in tests/func/mongo/sync/f_sync_auto_reconnect_cache.c.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>