Don't error when grouping zero-row data frames. Fixes #486

Fixes the error that previously occurred with:

```R
dplyr:::grouped_df_impl(data.frame(a = numeric(0), g = character(0)), list(quote(g)), drop = TRUE)
```

I'm new to the C++ part of this codebase so please feel free to change, critique, etc.