Invitations are now sent by a resque worker

An Invitation object is created for each invitation sent (one invitation per
user) and sent in background by a resque worker.
With this we have a record of all invitations sent and whether it was
successfully sent or not.

refs #811, refs #371