bookmarks: Be more specific when deleting ranges

Keep one bookmark if the line the range started or ended in has a
bookmark, otherwise remove all bookmarks from the range.

Previously, deleting a range containing bookmarks always left one
bookmark, no matter where in the deleted range the bookmarks had been.

https://bugzilla.gnome.org/show_bug.cgi?id=719804