Support ordering pages and articles when iterating in templates.
Order can be set to a metadata attribute or a sorting function.
Default to order by slug for articles and order by filename for pages.
Add test for PAGE_ORDER_BY
Merge remote-tracking branch 'remotes/malept/davidmarble-page-order-by' into davidmarble-page-order-by

Conflicts:
	docs/settings.rst
	pelican/generators.py
	pelican/tests/test_generators.py
Add missing methods
Address code review comments from PR getpelican/pelican#1348

The text about the sort-by-key function comes from:
https://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange

Minor style cleanup as well.
Merge branch 'master' of https://github.com/getpelican/pelican into davidmarble-page-order-by
Addressed comments from @avaris in PR getpelican/pelican#1348
Merge pull request #1348 from vjousse/davidmarble-page-order-by

 Support ordering pages and articles when iterating in templates.