encodings.py: oops, split enddiv and done

The HTML had </body></html> after each table.  Obviously, this should
only come at the end of the file, so split it up into two separate
pseudo-functions and only call the second one when we are done.

encodings.html: Updated accordingly