Cleans up metastring library

In response to #5571, I cleaned up the API. I believe I also fixed 2 bugs. 

1. we were using the sanitized string as the key in memcache
2. when a case insensitive result was requested were returning the results as an integer or array based on how many results rather than always returning as an array.