TreeDict: rewrite to C++, part 1: mutable TreeDict