application: add methods to get the scale factor and GdkWindow

We'll use these to render HiDpi icons.
documents: use scale factor to create collection icons
documents: store images in cairo surfaces

This adds support for HiDpi.