Store types in enum, generate schema from enum in tool

The enum now has the data types for the fields. Also, IndexTool now
supports generating a JSON schema from the enum, so we don't need to
maintain both the code and the schema file at once.