Move metric validation and row key generation to TSUID

This is not a good permanent solution. It's just a straight extraction of a few methods to make them reachable on a few parts we're working on.
No, for now we need them in both `net.opentsdb.core` and `net.opentsdb.storage`.