Removed a bunch of superfluous functions.

Dispatching made some emplace_back instances obsolete.
Added parameter lists to group_by and order_by
Calculate the tables required by a sub-select
Improved decision whether a select is a value or not