[TEST] add more tests
[BUILD] change compiler settings
[FIX] remove extra semicolon
[FIX] fix compiler warnings (unused arguments / init reorder)
[FIX] mark / comment out dead code
[FIX] destructor should be virtual

polymorphic base classes should have virtual destructors
[BUILD] fixes to the build system

- build with -fPIC on linux/mac systems
- add compiler warnings