Move most of to_html.py from cnx-upgrade to cnx-archive

Remove dependency on cnx-upgrade by moving all code cnx-archive requires
into cnx-archive.