Split the deriving code into submodules for each trait

This is the first step in refactoring the deriving code in libsyntax. No code is changed, just rearranged.