Make the messages list synchronized as a whole, instead of just using a volatile reference to it.
I am still observing random failures with TestWsWebSocketContainer, so an issue is not here.

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