Remove unused internal API psdimension.
Parse paperspecs at init time, not build time.

As a side-effect of using a hash table to store the paperspecs for
faster retrieval, remove the unused APIs paperprev and paperlast. None
of the Debian dependencies used these APIs.