Optimise the display of the preview in file selectors

Previously, the reading and decompression occurred in paintBackground,
which was only called once per file as a result of there being no
action that left the same file selected. Allowing file names to scroll
invalidated this assumption.

BrowseDialog now calls selectionChanged upon itself polymorphically
after the selection changes, allowing the Selector class to react by
caching the preview for the newly selected file. The cached image is
kept around until the selection changes again.
Scale preview images to the screen size in file selectors

If a preview image does not fit either the width or the height of the
screen, it is resized to fill the screen while preserving the image's
aspect ratio.

A mostly bilinear scaler is also included.
Allow scroll bars to align to the right of arbitrary rectangles

Whereas most screens will want a scroll bar that is aligned with the
right edge of the screen, panes will want the main scrollable area to
have a scroll bar aligned with the left edge of the pane.

No panes currently exist, but one is planned.