Dont crash when kv storage broken
Auto repair leveldb storage if corrupted
Merge remote-tracking branch 'upstream/master' into next