-Added ScopedLock to thBase.scoped.
-Minor refactorings and bug fixes for 2.065
-Added thBase.weakptr