queryservice: Fix & improvements to comments parser.

The comments parser had a bug where it would fail to
detect comments like this: /** ... */. This CL fixes it.
I've also the panic scheme of handling failures.
The resulting code is longer, but more readable.
I've also written more tests to cover the corner cases.
Merge branch 'master' into vtocc