test(app): add user model test that saves user with preoccupied email

Add new unit test for user model that tests mongoose custom validator
for checking availability of user email.
Also add user object refresher due to the fact that mongoose does not insert
user object into database that has been already inserted.
And add local variable to user model unit test that checks failure when
saving user without an email in order to prevent global variable from changes.