iniiial commit for metrics_idx table

metrics_idx is a custom index that will be used for querying metrics. The
metrics console app display all the metrics in the side bar. It will eventually
query metrics_idx. The table is now also used for the (optional) metric
creation which ensures that metric ids are unique.