fix(Authentication): resolve page flicker when trying to access unauthorized page.

When loading an unauthorized URL the page can flicker. It is caused by the instantiation of the associated controller and template before the AuthenticationSharedService.valid method has been resolved.

This comportment came from the way the authentication are resolved:
1. Upon an URL change, a $routeStartChange event is emitted.
2. On $routeStartChange event, an asynchronous validation (AuthenticationSharedService.valid) is called.
3. The function associated to the $routeStartChange event continue without being stopped and emits a $routeChangeSuccess event.
4. On $routeChangeSuccess event, the controller and template associated to the view are instantiated and rendered.
5. The AuthenticationSharedService.valid method is finally resolved and emits either an event:auth-notAuthorized or  event:auth-loginRequired event that trigger an url change, thus the flicker.

I have worked out a solution on [the sample app](https://github.com/tgillieron/jhipster-sample-app):
1. I made the AuthenticationSharedService.valid method return a promise
2. I created a $secureRouteProvider that decorate the $routeProvider with a new method: whenAuthenticated(path, route)
  * This method adds the AuthenticationSharedService.valid method to the route.resolve object.
  * Because the AuthenticationSharedService.valid method is now in the resolve object, the route will wait for it to be resolved before instantiating the controller and template.
  * If the AuthenticationSharedService.valid method is rejected, the $routeChangeSuccess event will not be emitted and the user will be redirected to the login or error page without the unauthorized URL being rendered.
3. I replaced every call to the $routProvider.when method by $secureRouteProvider.whenAuthenticated

Linked to #550.