mapistore_replica: Add mem-alloction checks in mapistore_replica_add()

This is by far a no exhaustive implementation for return values verification.
In order to cover all error paths, we need to refactor this function.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>