Adds support for themes functions

With this changes the themes can have (not obligatory) a functions.py
file bundled with the templates. The purpose of this file is to hold
helper functions to be injected into the jinja2 templates. To control
which functions will be injected is specified the __export__ list. A
sample was inserted in pelican/themes/simple/templates/functions.py.