Tokenize queries and do fuzzy matching

See tests for some examples of how this works. The gist is that typing `q` will offer `sample:GQ` as a completion. After much experimenting, I found that doing fuzzy match on the last token and exact match on the others worked pretty well.

Lots of changes here, but I think overall this results in clearer code (hopefully!).

The `mocha-clean` dep cleans up long mocha stack traces.

Fixes #240 
Expectations around documentation, testing and robustness are different for internal methods. But that only matters when you're reading the definition, not when you're using the function. So I switched to a comment mentioning that this is internal.