Disallow selections that lie completely outside the image

With this, the selection engine is completely updated to allow
outside-the-image selections without any loss of prior functionality.