cache: rework reusing transactions (LMDB)
Previously a read transaction could be held open by each fork indefinitely. That was done for better speed, but it had a downside of keeping old pages alive and potentially reading only old data, until some writes were attempted by that fork. Now kr_cache_ provides explicit API for suitable points where to break transactions, reusing the _sync command. On LMDB side the read-only transaction is only reset and later renewed, supposedly giving better performance than aborting (see LMDB docs on reset+renew). Performance: preliminary testing with two forks, resperf on comcast query-set shows no noticeable difference in peak QPS.
Showing with 147 additions and 106 deletions