Merge branch 'master' of https://github.com/cbhaley/calibre
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
Fix crashes when switching libraries with marked books

Fix a bug that could cause calibre to crash when switching from a large
library to a smaller library with marked books. Fixes #1239210 [Calibre 1.6 64bits crashes when changing library](https://bugs.launchpad.net/calibre/+bug/1239210)
Update Diagonales

Fixes #1239235 [Updated recipe for Diagonales](https://bugs.launchpad.net/calibre/+bug/1239235)
Start work on global undo/redo for tweaking
Update Carta
Update Television Without Pity
Content server: Use internal redirect for single item categories

Content server: Fix single item categories not working with reverse
proxy setup. Fixes #1238987 [Calibre behind apache server sometimes returns 'localhost' URLs](https://bugs.launchpad.net/calibre/+bug/1238987)

Single item categories were using HTTP 303 redirects which are resolved to
http://localhost:8080 absolute URLs by cherrpy (since cherrypy has no
knowledge of whatever server the apache process is exposed as). SO
instead we use an internal redirect, which does not suffer from this
issue. It does mean that bookmarking the URL wil have unexpected
side-effects if the number of items in the catefory ever increases to
more than one.
Fix issue #1239527: Htmlz inline css doesn't single quote fonts & thus destroys html.
Fix issue #1239530: Htmlz conversion places <head> in <body>, not before.
Fix issue #1239555: Htmlz conversion incorrectly handles <br/>.
HTMLZ Output: Various fixes

HTMLZ Output: Fix <style> tag placed inside <body> instead of <head>.
See #1239530 (Htmlz conversion places <head> in <body>, not before)

HTMLZ Output: Fix inline styles not escaping quotes properly. See #1239527 (Htmlz inline css doesn't single quote fonts & thus destroys html)

HTMLZ Output: Fix incorrect handling of some self closing tags like
<br>. See #1239555 (Htmlz conversion incorrectly handles <br/>)

Merge branch 'master' of https://github.com/user-none/calibre
Update cracked.com
Edit metadata dialog: Fix incorrect size on multi-screen setup

Edit metadata dialog: The dit metadata dialog currently limits its max
size based on the geometry of the smallet attached screen. Change that
to use the geometry of the screen on which it will be shown.
Fixes #1239597 [metadata window height not remembered](https://bugs.launchpad.net/calibre/+bug/1239597)
...
Allow using textures for cover grid background

Cover grid: Allow using images as the background for the cover grid. To
choose an image, go to Preferences->Look & Feel->Cover Grid. Fixes #1239194 [[Ideas] -->book grid](https://bugs.launchpad.net/calibre/+bug/1239194) [[Ideas] -->book grid](https://bugs.launchpad.net/calibre/+bug/1239194)

The builtin textures come from subtlepatterns.com
Fix removal of textures not working

Also credit subtlepatterns in the texture chooser dialog.