A few fixes... (WIP)

Delete empty collections on delete
Avoid the broken pipe on shutdown issue with KUAl's IO redirection
WIP work on making incremental updates work properly when importing from
Calibre