Fix wrong using of Metadata in 15,16 migrations

In up>down>up mode migrations are failing due to using of common MetaData.
It should be declared separatly for both of migration methods.

Fixes-Bug: #1240898
Change-Id: I8f6555ce44204e79a9c47b7caa1fe05970f4e3f0
Replace tests.base part1

It is the first step to replace using ceilometer.tests.base with
openstack.common.test.
Displacement method assertTimestampEqual() from TestCase to
BaseTestCase class in base.py because TestCase
will not be used in the future.

Change-Id: Ic56041516a142590e0ee869e60f939c5245ca977
Replace tests.base part2

It is the next step to replace using ceilometer.tests.base with
openstack.common.test.
In this patch is changed for using
openstack.common.test and added needed fixtures in test classes.

Change-Id: I091fbf1419e78bf69491f5787deb93306d933c27
Replace tests.base part3

It is the third step to replace using ceilometer.tests.base with
openstack.common.test.
In this patch is changed for using
openstack.common.test and added needed fixtures in
test classes.

Change-Id: I1289d86d5ff6668c580e4bb2c01787e0a5c44779
Fix for get_resources with postgresql

Add max_ts and min_ts to GROUP BY in sub-query, since they need to be aggregated to SELECT them.

Closes-Bug: #1241526
Change-Id: Ifdd2bc661b5da31bd40d1c3fa1fc442d7417399f
Merge "Fix wrong using of Metadata in 15,16 migrations"
Merge "Replace tests.base part1"
Merge "Replace tests.base part2"
Merge "Replace tests.base part3"