Implement mouse captured histogram selection without setCapture.

Chrome doesn't support setCapture, so let's use the old fashioned way of capturing the mouse: setting the mousemove / mouseup listeners on the window object. This patch sets the listeners during mousedown processing and unsets them during mouseup processing.