[#1163] Users can be deleted

To do this, I've configured the User model to be stateful using vdm.sqlalchemy.
Right now, there're two states: active and deleted. If a user is deleted, he
can't login, and is unauthorized to do anything. She also doesn't appear in the
user's list anymore, but you can still access her profile page, if you know her
username.

If she was logged in when her user was deleted, the next time she goes into
CKAN, she'll be logged off. Unfortunately, there's not a useful message like
"Your user has been deleted." Yet.

There's no way to undelete a user, but it should be simply creating an
action to set her state to active.
[#1163] Use ckan.model.State instead of vdm.sqlalchemy.State

This makes us a bit less tied to vdm.
[#1163] Use ckan.model.core.State instead of ckan.model.State

With this change, we're able to avoid having to load ckan.model inside methods,
to avoid circular dependencies.
[#1178] Add PENDING state to User
[#1178] The user is activated when it performs the reset password
[#1178] Admins can invite users

The invited user starts in pending state, with the password reset key set. We
still have to send an email to the user telling him/her to change the password
and log in.

I had to change authorization code to only automatically unauthorize deleted
users, not pending. This was because the users needs to be able to perform the
password reset when pending, to be able to become active.
[#1178] perform_reset uses the received id as the context's user

When performing a password reset, the user is probably (always?) not logged in.
So c.user is an empty string. So, the auth functions have no way to tell which
user is trying to reset his/her password.

This worked fine before, because everyone was able to reset the password. But
now that we've got users in DELETED state, it's not the case anymore.
[#1178] Send email to the invited user

I removed the time.sleep(0.1) on TestMailer. Looking through the code, I
couldn't find anywhere where a timer looked needed. And I ran these tests a
hundred times without the timer to see if I could make them fail, but no. So, I
guess they're not needed anymore.

I also had to move the RESET_LINK_MESSAGE inside get_reset_link_body(). This
was because, when importing ckan.lib.mailer in ckan.logic.action.create.py, I
got:

    TypeError: No object (name: translator) has been registered for this thread

This seems to be because we were using _() before pylons had a change to set up
the translator. Moving it inside the method solves this.