serialize documentation data to JSON

This adds a JSON serialization of raw DocumentationData and processed
DocumentationDataView to the generated files. This also means adding
a Gson TypeAdapterFactory for the Optional<T> type and some renaming.