Improve dirty block eviction performance

- Block cache tries to avoid evicting dirty B+tree nodes because
they are likely to be updated later. This largely reduces the
write amplification during bulk load when working set is larger
than the RAM size (using 200M docs, W.amplification during bulk
load is reduced up to 5x).

- If O_DIRECT flag is not set, we don't need to use additional buffer
for flushing dirty blocks. Dirty blocks are directly flushed by using
pwrite(), and they will be buffered by OS's page cache. It reduces the
memcpy overhead (and also malloc overhead).

Change-Id: I86e958b29be38981fd56ba07430d8cf7cc41d847