[DDMD] [refactor] Move *Declaration::toDebug into free functions