Cached passability classes

Passability classes contain static data. So the got cached and need not
be reloaded with every frame.
Did as well do some optimization to the other caches.