Fix so that multi-threaded rendering of display list works.

Proper use of mutex lock in areas where we multiple threads can
not be accessing the document or page level objects at the same
time.   With this fix, multiple threads can be rendering different
display lists at the same time.

Also fix for use of page selection scroll bar so that it does not
render the page until the user lifts off the bar.  This is the
same as the Android app and avoids smaller devices getting overloaded
if you do rapid scrolling in a document.
Add CMYK support to PAM output.
Add CMYK support to PWG output.
Add CMYK and CMYK Alpha colorspaces to mudraw options.
Special case clear_pixmap_with_value for CMYK colorspaces.
Fix bug in gray to cmyk color converters.
Fix segv bug in clear_pixmap_with_value functions.

Image masks don't have a colorspace; check before dereferencing.
Fix UI so that consistent zoom size is maintained as pages changed.

Also fix issue that occurs in Windows 8.1 with an unhandled exception
if a mouse scroll occurs before a document is even opened.

Fix issue with keyboard based update of page slider.
Addition of printing support.

This uses the xaml printing methods.  It is likely that I need to go do a DirectX approach since the xaml
printing method could run into memory problems as it seems the architecture requires all the pages to
be rendered prior to the print job even starting.  Currently checking on this with a contact at MS.

I wanted to get this code in place now since it is working and it has the needed framework for much of
what we want.   A change to DirectX requires a changes in the solution file that may be complicated and so it
makes sense to do a split here with respect to providing printing support.
Make sure declarations come first.   This would not compile with default windows settings.
Fix of tab/space issues as well as changing thumbnail scale look ahead to +/- 2. Thanks to Robin for catching this.
Merge branch 'master' of git://git.ghostscript.com/mupdf
Android: Cancel the patch before update()'ing the page.