HashBuilder usage and QueryProfilerFactory clean-up

- Use simpler approach in `SubobjectParserFunction` to access `HashBuilder` directly
- Use `Query::getHash` for the QueryId in the `QueryProfiler`
- Clean-up `QueryProfilerFactory` interface for simpler usage
- Clean-up some of the profiler tests to ensure better readable

Also relates to #555