More d_string into its own file; Rework base headers
Add extra mutex class
Misc fixing
Add leakdetector class