[DDMD] [refactor] Move TraitsExp semantic methods into free functions in traits.c