Restructure resolver code

* No weak values to avoid frequently researches of classpath
* restructure resolver of context- and class-classloader
* some minor improvements.