add support for mirroring and rotation

Add support for rotation and horizontal/vertical mirroring of
documents. Intended to be used with incorrect oriented documents.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
add single page caching

Add caching of the current page. This speeds up movement, rotation
and mirroing for complex pages.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
code cleanup

Remove dead code and fix indention.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>