libview: Make sure we never use negative coordinates in selection rectangle

https://bugzilla.gnome.org/show_bug.cgi?id=702874
libview: Position the caret cursor at beginning/end of the line when clicking outside the line

Position the caret cursor also when not clicking over text if the line
contains text.
libview: Keep the offset inside a line when moving the caret between lines.

https://bugzilla.gnome.org/show_bug.cgi?id=702075
libview: Remove unused in_selection member from SelectionInfo struct

This is currently unused and redundant, to know whether there are
selections we use selection_info.selections.
libview: Move the caret cursor when clicking outside a selection