HUE-2453 [beeswax] Add an order by id for the query_history

Additionally sort by id DESC when queries have the same submission time (another key).