[DDMD] [refactor] Move Type::deduceType and friends into a visitor class/free functions

This is the last frontend one!  9 glue pulls remaining.