Fix problems with caching the window when the magnification changes when the mouse is outside the pdfview. Clean up magnification code a bit. 
Fix problems with caching the window when the magnification changes when the mouse is outside the pdfview. Clean up magnification code a bit. 

JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim