some cleaning up of piece picker states for failed writes and hash checks. Some more invariant checks. fixing some unit tests
test locked pieces in piece picker test
fix race condition between write and hash jobs when releasing a fence. write jobs are now inserted in the cache immediately, before posting the fenced jobs
fix release build
keep stats on the number of loops in the peer-list to find a connect candidate
optimize policy::connect_one_peer by caching peers
fix force recheck issue