xhtml_style/authentication_policy: merge "logged_in" implementation

This simplify code and also bring the functionnality of c484f8aa
(erp5_xhtml_style Base_cancel and logged_in: do not allow redirection outside
ERP5 site., 2016-02-12) for the cases where authentication_policy is
installed.

This also fixes a problem with translations of "Your password will expire at
 {date}", which was using different messages for every possible date.

Tests needed to be updated because we now redirect with properly URL encoded
parameters.
2 jobs for fix/external_redirect_authentication_policy in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5.CodingStyleTest-TestRunner2

00:50:32

failed ERP5.UnitTest-TestRunner2

01:54:40