create func key destination when creating a user
delete func key destination when deleting a user
fix pep8 warnings
reorganise helpers in func key dao tests
implement func key deletion in DAO
add relationships in ORM to prevent delete errors

when relationships aren't configured, sqlalchemy does not know in what
order to delete rows, so sometimes child relationships were
randomly deleted before the parent
fix primary and foreign key declarations in ORM models

Composite foreign keys need to be declared using ForeignKeyConstraint,
otherwise sqlalchemy generated 2 seperate forign key constraints.
refactor func key tests, move helpers into test_dao
fix naming convention
implement template_dao.remove_func_key_from_templates

when deleting a destination (i.e. a user) we need to
remove the func key from all templates, since the func key
will no longer work
add missing file
Merge branch '4951_func_key_user_destination'