fix snap_io_rate_limit handling
replace fdatasync() to open(O_SYNC)
fix: do fdatasync() only when snap_io_rate_limit bytes written
Merge branch 'stable' into odkl-fix-snap-io-rate-limit
gh-45: review fixes
Merge branch 'stable'

Fixes gh-45.

Conflicts:
	src/recovery.cc
Fix a merge bug for gh-45, add a test case.