MB-10273 Implement deduplication in file merger

The current k-way file merger is not designed to handle
duplicate entries. We need to be able to merge multiple
sort record files which are created at different points in time.
The merge should be able to be peformed such that it deduplicates
the records according to the file priority. If there are duplicate
entries for same key across multiple files, the entry from highest
filenumber should be picked.

Refactored file_merger to handle deduplication. The file merger expects
all its input files to be sorted and have only unique records. The input
files should be deduplicated before passing over to the file merger for
deduplication.

The file merger deduplicates records as per the following example:

File 1:
insert key1,valx1
insert key2,valx2
insert key3,valx3

File 2:
insert key0,valy0
insert key3,valy3
insert key4,valy4

Output merger file:
insert key0,valy0
insert key1,valx1
insert key2,valx2
insert key3,valy3 <-- picked key3 from latest file (File 2)
insert key4,valy4

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