Add simple pagination.

This pagination algorithm is quite simple and only deals with documents with
uniform pages.
Features not implemented:
  - frame positioning and wrapping
  - different pages sizes
  - hard page breaks
  - tabs
  - headers and footers
First commit of work on different type of pagination implementation.
snapshot