Initial sketch of SecurityListener.
Record correct username upon logout.
Firing separate events for password authentication vs. web login, as these are somewhat distinct internally.
Does not currently seem straightforward to determine when authentication (successful or not) is from REST vs. web UI;
could distinguish CLI mode if that is useful.
Merge branch 'master' into login-events-JENKINS-20999
Merge remote-tracking branch 'origin/master' into login-events-JENKINS-20999
Better for SecurityListener.authenticated to take a UserDetails, since some implementations (as for AD) may have additional information.
Merge branch 'login-events-JENKINS-20999'
[FIXED JENKINS-20999] Noting merge of #1064: SecurityListener.