Fix access to shared pointer for waptdb (threading problem). fixes some memory leaks.
added superclass for WaptDB (prepare work for WaptSessionDB)
setup 0.6.22