Extract to a configuration function how roles are mapped from a profile

* Roles can now be specially mapped by the upstream implementor using the rolesFunction in configuration.
* Fixed test.html having a stale reference to removed controllers.js.