Implement new authentication system.

Information on the logged in user is stored using AngularJS's
$cookieStore module.

The old authentication system was a bit scattered, this refactor tries
to bring some more organization to it. Authentication's event broadcasts
and cookie management is now concentrated in an AuthenticationService.
Login/logout event names are now AuthenticationService constants. User
login/logout event broadcasts automatically happen as
AuthenticationService is modified.

User login verification and validation has now been moved to the login
module. The remaining login/logout code in acj-controllers should be
removed except that they seem to be used in a lot of places, so have to
remove all references to them before removing.

On the API side, a successful login will return the user's id. The login
controller has to retrieve additional information on the user using the
UserResource.

Still haven't decided how to do logout, but that should be next.