Refactor/user database

This is based on #9.

Refactor some of the UserDatabase related code. In particular I introduce a UserEventHandler that will handle the user creation and destruction.
Test if a database exists and if design documents exist before creating them. This prevents 409 and 412 responses that show up in the bigcouch log. The refactor made isolating and testing this code easier.