Select images on mousedown using Rangy

Removes _selectedImage.
Logic of when dialogs pop up or not is in the works in #639 anyway.