Hash queries by MonitorQuery instead of BytesRef

Also change equals method in MonitorQuery. This will speed up query cache.