First pass at adding permissions.

* Most of the necessary code for masquerading is in place.
* Permission challenge of admin or admin masquerading as, works
* Added some stuff to deal with 404 errors rasised due to new permissions.
* Show all users on /admin/users page.
* Show if user is an admin
* Add buttons to set and revoke admin rights
* Add masquerade buttons to users when not masquerading
* Add cancel masquerade button when user is masquerading
* Add test for Masquerade