[DDMD] [refactor] Move Type::toDt into a visitor class

Tiny one.