Support ordering pages and articles when iterating in templates.

The order of pages and articles when iterated in templates can now be set to a metadata attribute or a sorting function. By default to articles are sorted by slug (same as before) and pages are sorted by filename (new).

This fixes #420.

You can tweak how pages and articles are sorted in your `pelicanconf.py`. For example:

    PAGE_ORDER_BY = 'page-order'

In this case, just make sure that all pages have the metadata attribute 'page-order'. 

Advanced: You could also use a sorting function. See the code for an example, as a sorting function is used to get filenames based on the `source_path` attribute of content.