MB-14060 Compactor grab the writer lock while flushing the WAL only.
MB-14060 Compactor grab the writer lock while flushing the WAL only.

As the compactor spends significant port of time in flushing the WAL
entries into the new file, it just needs to grab the writer lock during the
WAL flush phase only. From the performance tests, this shows a better
performance behaviors.

Change-Id: Ib4f4d732cdcb9b112bf367d94b5fc495fea36fe7

hisundar/forestdb,sushmaad/forestdb,couchbase/forestdb,joliss/forestdb,jinxuan/forestdb,wurikiji/forestdb,yyangpan/forestdb,yyangpan/forestdb,wurikiji/forestdb,joliss/forestdb,couchbase/forestdb,jinxuan/forestdb,zhaog/forestdb,hisundar/forestdb,sushmaad/forestdb,zhaog/forestdb