Adaptations of csv/json writers for nested prototypes
Extract common functionality of writers

Making it possible to simplify writers a lot, as well as reducing
duplication.
Update README on nested prototypes and fields xrefs