pandas: By allows series-groupby, repacks to dataframe

Some operations like ``nunique`` can only be performed on series.
We need to internally allow SeriesGroupBy objects during the groupby
operation.  We check this case and recoerce to DataFrame at the end.
sql: add more reverse types
sql: head works on parent of table, not given table
Merge pull request #334 from mrocklin/various-fixes

Yet another bugfix PR