Registers cleanup

This series is here mainly for a543af0.  fdb4b6e was partially an experiment to try to clean up the manual `initialize_register_tables` requirement.  It didn't turn out quite as successfully as I hoped, mostly because there is a lot of template magic required.  But I think the readability is slightly improved, and not having to call `initialize_register_tables` eliminates a source of bugs.