factor login providers (database, imap) into interface/implementations

A servlet context listener uses the cloudcoder configuration
to decide which provider implementation to instantiate.

This gives us a flexible mechanism for configuring an authentication
mechanism.