Bug fixes

1. Bad type assertion leads to crash in knet
2. kdb write-ahead data file “overflow”
3. knet.peer goroutine leak