move active metrics to lookup type

This consolidate a bunch of code into a single place.  This also fixes a
bug where we were sometimes forgetting to add a new metric in Set().
Support proper glob queries

This pulls in some code from carbonserver to handle file-system-like
globs from an in-memory index using trigrams.  When this is cleaned up a
bit more, we should figure out which parts need to pulled out into a
common library to be used by both servers.
make int->string lookup table an array, because it is
docs++
file queries should always have .wsp appended
change topk query format foo.TopK.10s.* -> foo.*.TopK.10s
Merge pull request #1 from dgryski/master

merged latest master from @dgryski