Rewrite re-entrant phase-fair latching, continue LSM btree code