Fixed swift2thrift bug caused by the addition of unions

ThriftFieldMetadata.getType() was renamed to getThriftType(), and an
unrelated getType() function was added. Update the template to call
getThriftType.