Speed up sorting when book list is showing a subset

Speed up sorting when the book list is showing a restricted set of
books, such as when the results of a search are displayed or a virtual
library is used. Fixes #1217622 [calculated column sorts update the entire database while inside a Virtual Library](https://bugs.launchpad.net/calibre/+bug/1217622)