MB-10273 Add an optimization in updater's tmp records file writer

For every update made to a document, the tmp file writer adds
a remove record for previous keys emitted from the document
as well as insert records for updated documents's emitted keys.
Eg.

Mutation 1 for DocX:
emit() generates (key1, val1) and it is stored in the btree

Mutation 2 for DocX:
emit() generates(key1, val2)

The tmp file writer adds following two records:
remove key1
insert key1,val2

The btree module replaces the existing key if an insert operation arrives.
Hence we do not need a explicit remove operation for a key if an insert
operation exists for that key. Removal of old entry is performed before
insertion as part of btree update. This case can be optimized by avoid writing
`remove key` record to the records tmp file. Considering the general workload
being updates to existing keys, it can reduce the records tmp file size and
accomodate more btree operations in the update batch.

This also implies that only one record per key will be present in the records tmp
file. This condition makes the records file merging and deduplication
implementation simpler.

Change-Id: I9bd00d7ce5f98987491d275a9b70b25930528a76
Reviewed-on: http://review.couchbase.org/36893
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: buildbot <build@couchbase.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>