Union should not apply settings to the set

The union applied settings like group/having/order to the result set instead of the first select. This corrects that, they now apply to the first select.
Currently the query object doesn't support set settings. Use the string manipulation instead.