add newly added constraints to expire clear_expired_metering_data

- cascade deletes to metadata tables on meter deletion
- delete associations on object deletion
- add check to not delete user/project entries associated with Alarm

Change-Id: I24cbaea9ede6d142dc22eaf070b3f7d1f14b484a
Closes-Bug: #1258071
config: specify a template for mktemp

It's actually not portable to use mktemp without an argument, so let's
add a default template.

Change-Id: I5c254b12c05457d9e3ed5788dabb4c317d97b4aa
Merge "config: specify a template for mktemp"
Merge "add newly added constraints to expire clear_expired_metering_data"