Add page grouping functions

I wrote page grouping functions discussed at issue #412. As @spf13 suggestion, those return a PageGroup array. PageGroup has Key and Data field and Data is defined as Pages type.

I wrote them as Pages method, not ordinary template function like 'first' etc. because I think it makes those implementation more simple if the return value is defined like above but I'm not sure it's the best way. I'll welcome other ideas.