Use file sorter callback to build initial index

Initial btree index was built by reading the records
from a sorted records file. File sorter now supports
a callback which gets invoked as soon as final sorted
records are available from final sort-merge phase.

Initial index builder is refactored to build the btree
by avoiding final write phase of sorter and it builds
up through the sorted result stream.

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