Added little optimization for cache

Write with zero offset case
Merge pull request #196 from euroelessar/master

Added little optimization for cache
Do not mess with command flags, instead unlock/lock key. Otherwise final ack will be sent without lock and will be processed in non-blocking pool in parallel with blocking replies, which will force client to drop some of its replies (which have not been yet processed).
Fixed invalid error for read in case if there is no state

dnet_mix_states sometimes returnes 0 as result, which is invalid
Added reconnection logic debug

Conflicts:
	library/dnet_common.c
v2.24.13.20