Fix `GroupBy` function issues

Following issues are fixed

1. Can't access fields and methods specified in GroupBy call
2. PagesGroup doesn't contain Pages. It's always empty.
3. When GroupBy is called with Section key, it doesn't work as expected

Those are reported at http://discuss.gohugo.io/t/groupby-functions-problems-and-fix-ideas/308

I also added full tests for page grouping functions. Its test coverage is 99% (I couldn't cover the one case).