Fix a few issues with the new bookmarks handling code

I noticed a few issues with the way bookmarks are handled since f96357d. For instance, clearing the bookmarks file manually without resetting the sidebar-bookmark-breakpoint value as well, would cause newly added bookmarks to remain hidden despite the "Bookmarks" section being shown in the sidebar. Moreover, this PR avoids a segmentation fault caused by a missing NULL check in the DND code.
it's ok as is, i was looking at the diff - in practice it all works fine (plus we're handling -1 at startup anyhow)

Thanks!