fix pep8 warnings
refactor user tests, reuse common dao helper
reorganise tests into smaller units
remove redundant test
fix new user DAOs to use common helper
reorganise tests into smaller units
template dao only needs to create private templates
fix old DAOs to create private template before user
create private template before creating user
remove redundant preconditions in unit-test
disallow setting of user.private_template_id
Merge branch 'func_key_user_template_not_null'