Fix error if a marked book is deleted/merged.

Fixes #1239161 [Unhandled exception using "Mark books" feature](https://bugs.launchpad.net/calibre/+bug/1239161)
Allow marked book button to be added to main toolbar when device is connected

Fixes #1239163 [Mark Books cannot be added to "The main menu when a device is connected"](https://bugs.launchpad.net/calibre/+bug/1239163)
Fix title of downloaded ebooks.
Get Books: Fix downloading of some books in formats that do not have metadata yielding nonsense titles

Merge branch 'master' of https://github.com/user-none/calibre