MB-8029 Add file sorter module

This module does an on-disk sorting of files. It offers the
following advantages over the existing mergesort.c module:

1) Allow in-memory buffer sizes to be bounded by number of
   bytes, unlike mergesort.c which bounds buffers by number of
   records regardless of their sizes. See MB-8054;

2) Allow for a N-way merges, allowing for better performance,
   due to a significant reduction of moving records between
   temporary files;

3) Some optimizations to avoid unncessary moving of records
   between temporary files (specially when total number of
   records is smaller than buffer size);

4) Allow specifying which directory is used to store temporary
   files. The mergesort.c uses the C stdlib function tmpfile()
   to create temporary files - the standard doesn't specify in
   which directory such files are created, but on GNU/Linux it
   seems to be in /tmp (see http://linux.die.net/man/3/tmpfile).
   For database compaction and index compaction, it's important
   to use a directory from within the configured database and
   index directories (settings database_dir and view_index_dir),
   because those directories are what the administrator configured
   and may be part of a disk drive that offers better performance
   or just has more available space for example.
   Further, in some system /tmp might map to a tmpfs mount, which
   is an in-memory filesystem (http://en.wikipedia.org/wiki/Tmpfs).

Change-Id: Ic9e6c866452c2afb7a1569e21602c74f2ab1a458
Reviewed-on: http://review.couchbase.org/26189
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>