integrate merge routine for mongo objects and entities

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>