Moved functions.py from templates to theme root

As pointed by @tcg, the functions.py file is more suited to be located
in the theme root.