Copy query name from DB to query context when getting query status

This should stop intermittent failures in TestQueryService