Rename type field

'payload' is a better string for the Type field; 'type' causes
problems in Haskell and Ruby.