Update autogen scripts and templates for restructuring (rebased onto develop)



This is the same as gh-931 but rebased onto develop.

----

The gen-formats-pages and gen-meta-support targets were also run, but
both resulted in no changes (since no new formats were introduced after
rc2).