leveldb: compaction: Skip compaction of empty memdb
leveldb: Strictly check memdb preallocated buffer free capacity before write to prevent reallocation

Related to issue #51
memdb: Set variables to nil when iterator get released

Related to issue #51.
leveldb: compation: Release memedb iterator after being use for compaction

Related to issue #51.