MB-7882 Simple btree optimizations

This change removes some inefficiencies in the btree module:

1) Building unnecessary tuples when the extract and assemble
   functions are the default ones (as is the case for views).
   For this case, just don't build any tuples nor do any
   assemble/extract function calls;

2) Traversing a list of KVs and applying the assemble function
   to build a new list - this is waste of time and cpu when
   the assemble function is the default one (as in the case for
   views);

3) Traversing the same list 2 times and reversing an accumulator
   when encoding a kp node. This can be done in a single pass
   with the list comprehension expression and avoiding the need
   to keep a list accumulator and reverse it at the end.

This was found it profiling data from fprof. Nearly no impact on
view updates (due to existing pipelining), however view compaction
had gains of about 6% regarding time. Very small impact as well
on query response time.

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