ISPN-4056 Enable caching of permission masks to cluster registry

https://issues.jboss.org/browse/ISPN-4056

also fixes a couple of bugs that were affecting the test.
Hm I was mistaken, our "Infinispan Server" code still uses that method, but the new WildFly code uses a custom transport which extends JGroupsTransport and is constructed specifically.