Implement Summary for MongoDB

closes #584
This is maybe too specific.  It would fail on `by(t.a, x=(t.b + 1).sum())` if we ever got arithmetic working.  Although given that we can't do operations like that in mongo just yet then maybe it's ok.