Adding utests for selfregister controller

Preparing the springmvc migration. Fixing a bug also in the selfregister
controller: when creating a user group relation on the GUEST group
(auto-registered users), we have to set a profile for the newly created
user. For now, registeredUser, even if the new user claims to be of
higher profile.
Merge remote-tracking branch 'pmauduit/springmvc' into springmvc