Test fixes.
Fixed query result set.
Fixed a serious migration bug.
Merge branch '3.0-query' into 3.0
Removed QueryResultSet generic type. (Causes issues on different compilers.)