Make access of dispatcher list on socket wrapper thread safe

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1529537 13f79535-47bb-0310-9956-ffa450edef68
Partial fix for re-opened https://issues.apache.org/bugzilla/show_bug.cgi?id=49134
Ensure nested realms are correctly destroyed, ensuring that the associated MBeans are deregistered.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1529546 13f79535-47bb-0310-9956-ffa450edef68