Smooth zooming

The patch implements this feature http://bugs.pwmt.org/issue374

So the user gets instant preview during zooming, which is replaced by high quality one when the user stops at a desired zoom level. This is good for fast zooming and window resizing with fit-width.

I tested various ways of zooming and rotating, with poppler and mupdf. It seems fine. Please review for code correctness.
The return value of fabs is double and both new_zoom and old_zoom are doubles too, so we should probably compare it to DBL_EPSILON. And it should be compared with <=.