Optimize resource listener. Take into account final classes and the fact that classes are singletons inside a JVM. See http://stackoverflow.com/q/7322469/693752
Merge pull request #209 from roboguice/upstream-master

Optimize resource listener.