mongo-sync: make it possible to use recovery cache from an external proj...

...ect

Recovery cache definition is an internal, private definition
(and we don't want to change it).

This patch:
- adds a constructor-like method (_new) instead of init,
  which creates the cache object dynamically by allocating memory on the heap

- adds a destructor-like method(_free) instead of discard

Signed-off-by: Budai Laszlo <lbudai@balabit.hu>