Merge branch 'master' of https://github.com/cbhaley/calibre
Workaround for FileType plugins that override the output streams with buggy implementations
More robust against buggy FileType plugins on book import
Update The Guardian
Fix #1399848 [Can't fetch WSJ paid subscription](https://bugs.launchpad.net/calibre/+bug/1399848)
...
When doing "Add files to selected books" do not add the same format multiple times when the user selects multiple files of a particular format
Update The New Yorker
Serve kepubs with extension "kepub.epub"

Change the extension of kepuns to "kepub.epub" so that the browser on
the Kobo ereaders will download them from the server. This checks the
useragent so that only Kobo browser is affected.

Fixes #1400029 [Serve kepubs with extension "kepub.epub"](https://bugs.launchpad.net/calibre/+bug/1400029)
Small performance improvements for the content server kepub patch
Update Scientific American

Needs testing with an actual subscription
Edit metadata dialog: Allow editing identifiers in a dedicated window by right clicking on the identifiers edit box. Fixes #1400925 [[Enhancement] Improve the method for managing Indentifiers](https://bugs.launchpad.net/calibre/+bug/1400925)
Fix #1401085 ['calibredb list --for-machine' ignores custom columns](https://bugs.launchpad.net/calibre/+bug/1401085)
Fix #1401357 [Harmless error when merging files in the editor](https://bugs.launchpad.net/calibre/+bug/1401357)
Edit book: Fix auto-complete of closing tag not working when typing the closing tag at just before a word (the word would become the closing tag name).
A nicer repr for Tag objects
Dont fail when building translations if resources/localization does not exist, which happens for people building from a git checkout instead of the source tarball
Delete bookmarks from the database when deleting a book

Not sure how I missed this, but the bookmarks where being left in the
database when the books were deleted. This brings it in line with what
happens when using the device to delete a book.

Fixes #1401502 [Delete bookmarks from the database when deleting a book](https://bugs.launchpad.net/calibre/+bug/1401502)
Fix #1401536 [wrapped C/C++ object of type QAction has been deleted (on device unmount)](https://bugs.launchpad.net/calibre/+bug/1401536)
E-book viewer: Fix sorting of bookmarks by position in book not working on windows and OS X. Fixes #1402152 [error when sorting bookmarks by position](https://bugs.launchpad.net/calibre/+bug/1402152)