9. core: Automatic login filter

Currently login is performed by the GUI using a form where the user
provides the user name, the password and the authentication profile.
This works well for authentication mechanisms based on passwords, but it
doesnt work for other authentication mechanisms or when the
authentication is performed by the web server. This patches changes the
engine so that it will be able to automatically perform the login even
before the GUI is displayed. This is based on a filter that trusts the
principal provided in the HTTP request, assuming that it has been
populated by the external authentication mechanism (the web server, for
example). This principal isn't currently populated, but it in the future
it will be populated by the authentication filter

To actually have this working both the authentication filter (part of
the new authentication mechanism introduced in previous patches) and
this filter have to be enabled in the web application, adding something
like this to the web.xml files:

  <!-- Perform authentication: -->
  <filter>
    <filter-name>AuthenticationFilter</filter-name>
    <filter-class>o.o.e.c.a.AuthenticationFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>AuthenticationFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!-- Perform automatic login: -->
  <filter>
    <filter-name>AutomaticLoginFilter</filter-name>
    <filter-class>o.o.e.c.b.AutomaticLoginFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>AutomaticLoginFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

This patch doesn't include these changes to web.xml files, they will be
included in later patches, so there isn't actually any change in
behaviour yet.

Change-Id: I0b8cbee89b5bb96271c3706e9e75acbf2890a0b8
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>