implement SortBy and DistinctBy via struct tags + tests

new templates; fieldSpec gets a parent genSpec; range over fieldspecs
and write to file