Use the same OPAM new package table generation system as opam2web

Fixes #253. Fixes #326. Fixes #412.