Select images on mousedown using Rangy

Removes _selectedImage.
Some tests for linking/unlinking images.