unit tests for shared libraries

- Use a modified unit test handler which allows to selectively
  run unit tests. This is necessary because a shared library contains
  the code for all compiled modules, thus the default unit tester
  would run everything at once.
add shared library tests
add more tests for gc scanning and thread init