Remove code duplication Part 3

Remove code duplication from impl_mongodb and impl_db2 as both of
these drivers use pymongo. This is a multiple step process as there
are several differences between the implementation of these drivers.

The third step is about to move the alarm history related functions
into pymongo_base. Alarm change functions were not implemented in DB2,
the expectation is that the MongoDB implementation will work on DB2
also.

Change-Id: Icff92ac31829669481b512d5504dcc7e2668eb07
Merge "Remove code duplication Part 3"