If the user closes calibre while connected to a wireless device, cleanly...

... disconnect and flush the metadata cache.