Add typedef support

Parse typedef definitions and replace them with the actual thrift types. This is only lightly tested, it is entirely possible that there are infinite loops or other bugs in there. 

Now creates valid code for Maestro.thrift