Generalize Pipelines to Workflows.

Squashed commit of the following:
commit 915572f9fd3ce16a14870ab97a4eb8492bae48ba
Merge: f23ab51 197d016
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 22:05:57 2014 -0600

    Merge remote-tracking branch 'upstream/master' into 13-mongodb-equi-joins-merging

    Conflicts:
    	build.sbt

commit f23ab5132d25a896ac62eced3cff8fdac40a0ceb
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 21:58:54 2014 -0600

    Minor test update.

commit 77d86e07ce90f72c18a9b1a4311486114e94a52f
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 21:54:49 2014 -0600

    Merge pipeline ops before Group, not after.

commit 8292d52cadd51f539eb740f73cb7ac2a269dec97
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 21:49:14 2014 -0600

    Remove unused val.

commit 17fcd56d19f7f7748b7c5270a87a06ebea91f892
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 21:48:23 2014 -0600

    Fix merge of identical unwinds.

commit 9b0040c3aa93f83d71ecbc6f26e060180c5fe675
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 15:53:52 2014 -0600

    Fix &&&.

commit 5b90bbb40206ca784e8fc96b28ef8d1e563d9fbd
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 14:13:52 2014 -0600

    Reorder some methods.

commit 94a59e72dfc15a8a6a3823c49408645077545b44
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 14:13:42 2014 -0600

    Fix some places where we dropped groupBys.

commit 1dab38057b769e2f1e57d32bce8b3e7f022cfedc
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 13:37:22 2014 -0600

    Fix merging two GroupOps.

commit 72e8974d7cdcb93bbc2a97351a844560c85b65eb
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 12:01:01 2014 -0600

    Swap a couple lEft/rIghts that differ in Workflow.

commit c7ba41c38517a448888dc888a4d624103bbc6872
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 21 11:59:25 2014 -0600

    Port deleteUnusedFields optimization.

    Also integrate coalesce[Group]Projects into coalesce.

commit 7a31f404dda0fccd734ae14f5d9ff8c2955fc04d
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 20 21:10:37 2014 -0600

    Pre-convert PureOps to ProjectOps.

    Fixes some issues with merging.

commit 7af24e8df4f533b703b6e3b929bac500fc92d0ac
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 20 15:07:19 2014 -0600

    Don’t smash sort keys when concating arrays.

commit 6ce387ce0e9f0e8941cb3511978fec54765b6720
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 19 13:01:25 2014 -0600

    Port squashing from PipelineBuilder.

commit f392dca8bf18b6001e89dfdf813cdca36209ecee
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 19 12:31:03 2014 -0600

    Move join test to where it should be.

    (and out of the commented-out section)

commit 6036189c3eeb8a7de9aacdebd5fc32185d391661
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 19 12:17:52 2014 -0600

    Port &&&/>>> fix from PipelineBoulder.

commit 7822bc7f43d09dbdd2a3a9e6e99d8ef4a71d7ed4
Merge: 9ed1551 374f53b
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 19 12:09:27 2014 -0600

    Merge remote-tracking branch 'upstream/master' into 13-mongodb-equi-joins-merging

    Conflicts:
    	src/main/scala/slamdata/engine/physical/mongodb/pipeline.scala

commit 9ed15510c2bb7c57e5a02882778d512a1de319b6
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 15 22:03:04 2014 -0400

    Fix And/Or in WorkflowPhase.

commit fb60f00c5d2b20c75cba5a045ffe7c4bac3e20c2
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 15 17:45:20 2014 -0400

    Port John’s sorting fix.

commit 2fd9775b56a7363cfdd201b59df351c93d918846
Merge: a072ed9 f23b9a2
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 15 17:26:48 2014 -0400

    Merge remote-tracking branch 'upstream/master' into 13-mongodb-equi-joins-merging

    Conflicts:
    	src/test/scala/slamdata/engine/physical/mongodb/planner.scala

commit a072ed93efa3e246383a24db0924f50f8b8c8857
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 14 00:05:16 2014 -0600

    Various fixes

    • use `DummyOp`
    • fix `mergeGroups`

commit a58c2edb67eef12f85ef20d707680724c7337a06
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 14 00:01:52 2014 -0600

    Add a DummyOp.

    This lets us pass around an incomplete op as if it’s complete, and then when merged, the Dummy Op is just replaced with the other side of the merge.

commit 76f03efcb71b59c3ee65599842881cc55764a77e
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 23:21:41 2014 -0600

    Remove dead code.

commit 7bf3a0b60128e2441285c7e96b43e15d9a88d7f0
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 14:54:49 2014 -0600

    Make coalesce* traverse a bit more.

commit 7d04a66a28a958f9e0dabe92c5841f9545b6a32d
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 14:25:11 2014 -0600

    Move rewrites to _after_ recursive `step`.

commit 2cfbe0409c86f83749031fc1a8018d7582739e3f
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 12:30:11 2014 -0600

    Workflow merging sometimes switches left/right.

    Fix a test that depended on it not switching.

commit 0191fb9b4707eff64ce6c35b751b386d939cec26
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 12:09:55 2014 -0600

    Fix some handling of `base` when merging.

commit 64c3df153f067eacd85f4e897f0694c61fc860e4
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 13 08:59:23 2014 -0600

    Rename `meh` to `step`, because clarity.

commit dde417ac6beb3a52440edc896e9ac9568649ee5f
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 22:39:46 2014 -0600

    add coalesceGroupProjects

commit a2e3418f14bb2b569b798145b7d54d15bedee3e8
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 20:50:30 2014 -0600

    Fix makeObject.

commit cf16b26a1f20cd517f7e3c5c1e60dea4fabb24e5
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 20:48:24 2014 -0600

    Add `GroupBy` to WorkflowPhase.

commit 7e7c23c5975d9d9ef2b326f7ea2ea78325c02bd8
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 14:43:34 2014 -0600

    Add And/Or/Not/FlattenArray to WorkflowPhase.

commit 12fdd6d4fe92c9cb82631cef204ebc5e954f846b
Merge: ee72493 711f204
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 14:24:22 2014 -0600

    Merge remote-tracking branch 'upstream/master' into 13-mongodb-equi-joins-merging

    Conflicts:
    	src/main/scala/slamdata/engine/physical/mongodb/pipeline.scala

commit ee72493c00ea8564d31258c7ab31b8bf633cb816
Author: Greg Pfeil <greg@technomadic.org>
Date:   Tue Aug 12 13:04:15 2014 -0600

    Tons of WorkflowPhase-related changes.

    Including separating WorkflowBuilder and WorkflowOp.

    16 tests failing at this point.

commit 6f9f5384a10797b6828385ab07f5a4d9f3da1bc3
Merge: 0bb8008 28f05e6
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Aug 7 12:38:19 2014 -0600

    Merge remote-tracking branch 'upstream/master' into 13-mongodb-equi-joins-merging

    Conflicts:
    	src/main/scala/slamdata/engine/physical/mongodb/planner.scala

commit 0bb8008132d50fa052870fb8ddbc12263706bf3b
Merge: f2e1bbc aa659c8
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 16:06:09 2014 -0600

    Merge branch '13-mongodb-equi-joins' into 13-mongodb-equi-joins-merging

    Conflicts:
    	src/main/scala/slamdata/engine/physical/mongodb/planner.scala
    	src/test/scala/slamdata/engine/physical/mongodb/planner.scala

commit aa659c86aac77636c4946377d7c07c4c318e71ce
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 12:11:55 2014 -0600

    Add test that uses a $where clause.

commit 5117c591d27602ec3bd7926bf5f8e68db9155feb
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 12:06:47 2014 -0600

    Make the join ops a bit more comprehsible.

commit 07d9304edc385109c1de6fd7ca13a382e250dc2a
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 11:23:54 2014 -0600

    Made SelectorAndSemigroup an implicit.

commit 1abbcdf12b661af4939dcfb74a34f972efdc88b2
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 11:23:19 2014 -0600

    Add a `chain` helper function.

commit 88d899ee66b06b32e58ca0781107ddd18c3925cc
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 11:22:54 2014 -0600

    More WorkflowOp coalescence.

commit b46fcd9b34a1b6200d77909703003a2329c9f3a2
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 10:43:15 2014 -0600

    Fix overzealous WorkflowPhase failure.

    Now distinguish between a failed WorkflowPhase and an intermediate state without a WorkflowOp.

commit ac51a85ace9c2e2aac1cc67e4f151b15415a00dc
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 10:39:45 2014 -0600

    Don’t call jsInvoke directly from SelectorPhase.

commit 2b7a60f9f387ce4a37ec782c305544df24e8c997
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Aug 6 10:35:10 2014 -0600

    Lens all (well, one of) the things!

commit 1b111816d26ce9bed2404964ae09970119dd8e89
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 1 11:51:08 2014 -0600

    Add a join planning test.

commit adf45ffc482de539492b4372903931c970cdd278
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 1 11:50:43 2014 -0600

    A partially-working Workflow planner.

commit 46c11929b995aa9ab9570c5a12ca9dbc677db17e
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 1 11:50:26 2014 -0600

    Add the new WorkflowOp data structure.

commit 96d29e387a5ece259af61851f388e880b3e41e3c
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 1 11:50:08 2014 -0600

    Add a formatter for FoldLeftTask.

commit 50368283aa94eab5277eb484bfb4c76f06681aa3
Author: Greg Pfeil <greg@technomadic.org>
Date:   Fri Aug 1 11:49:20 2014 -0600

    Add a simpler join compilation test.

commit df092015df5ea30f9af091884d63146c4efb054c
Author: Greg Pfeil <greg@technomadic.org>
Date:   Thu Jul 31 13:34:20 2014 -0600

    Initial (broken) WorkflowPhase

    Want to get this in as an at-least-compiling point, before I break things even worse again.

commit 533674183176be6c7a7a9521418b8cbdbe95936e
Author: Greg Pfeil <greg@technomadic.org>
Date:   Wed Jul 30 13:27:07 2014 -0600

    Add JsExprPhase
Fix Between semantics.
Revert a debugging change.
map $dayOfWeek for dow and isodow (Fixes #120)

    Preserve nodetype from the left on no change

    simple tests for `dow`, `isodow`
Merge remote-tracking branch 'upstream/master' into generalizing-to-Workflow

Conflicts:
	src/test/scala/slamdata/engine/physical/mongodb/planner.scala
Merge pull request #254 from sellout/generalizing-to-Workflow

Generalizing to workflow
Merge pull request #253 from mossprescott/120-dayofweek

map $dayOfWeek for dow and isodow (Fixes #120)
handle Read from non-trivial path in workflow builder
Convert WorkflowPhase from PhaseE to Phase.

So we can collect errors whenever a node can’t be created, but only report them if we don’t have a Workflow at the end.
Convert JsExprPhase from PhaseE.
Convert SelectorPhase from PhaseE.
Convert FieldPhase from PhaseE.
Add a test for filter that requires JS.
Merge pull request #256 from mossprescott/paths-quick-fix

handle Read from non-trivial path in workflow builder
Add test for mixing JS and non-JS filter.
Merge remote-tracking branch 'upstream/master' into joins

Conflicts:
	src/main/scala/slamdata/engine/physical/mongodb/planner.scala
Merge pull request #257 from sellout/joins

arbitrary JS in filters
Merge branch 'master' into wip/104
test with mapreduce
back to a JSON-based DSL for tests
- enumerate the resources directory, and run everything called ".json"
- optional fields for backends to run on and how to match
- a few example tests
- only one data file per test