newdb: Fix temp duplicate catalog entries in book list

Creating a catalog with an already existing catalog in the library would
cause a temporary duplicate entry in the book list (the entry would go
away on restart. Also fix the author sort for catalogs generated in the
AZW3 format not being correct.