Do inserts in a more performant way

Use the "on duplicate key" syntax to remove the previous select
before insert. It also allows more than one AlarmCreationBolt to
run concurrently since duplicate creation of metrics was possible
before this change

This requires the change to the schema in
https://review.openstack.org/125490

Change-Id: Ieafa732e822a38ae118037d3c460ce60bce1c36c