Shutdown Akavache properly