PushSelects: simple push Select conditions through Apply

Fix #188

Basically, if a Select only touches columns from the Apply that are
UnnamedAttributeReferences, we can push the Select through the Apply.

However, note that Apply might reorder columns. Thus we must reindex the
Select condition based on the input to the Apply.
test for pushing selects through apply
tdd for pushing selects through groupby
PushSelects: tidy push through apply, implement push through groupby

We push selects through groupby if the selects are only on the group
keys (and the group keys are attribute refs). It works the same as
pushing through apply.

The tidying is that now both these rules handle the case when the
Apply/GroupBy contains named OR unnamed references. Before it only
handled unnamed references.

Fix #190
myrial: don't emit trivial apply

If the apply being emitted is simple input.*, skip it.
myrial: test a potential corner case of 6ca8620263929a5f467b719f7ef6574152ecf4b0

Was worried that 6ca8620263929a5f467b719f7ef6574152ecf4b0 might lead to false positives of query like

[FROM x EMIT z.*];

however they were caught anyway. These tests give me assurance.
Merge pull request #189 from uwescience/push-selects-through-apply

Push selects through apply and groupby