fix context dao, return context model when created
fix dissociate line_extension
fix missing unittests for agent_dao
add missing unittests
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
check that line still has a context after dissociation
rename method, make private
rename tests, make their description more explicit
add missing file
Merge branch '4951_func_key_user_destination'
resource.get now returns a model, even if it is disabled