Make union/except/intersect chainable as SelectManager

Fixes #118.

This is the same as #239, but against master instead of 4-0-stable. It would be really nice to get this in so we don't need to keep freshening it! Or if there's a reason it isn't being merged, feedback would be great.
this assignment can be hoisted:

```
@ast = if cores
    ....
  else
    ...
  end
```