bcache: fix use-after-free problem in bcache_device_free()