MB-6595 Try to lock beam into a memory on start up.

This prevents major page faults and thus decreases chances of hitting
timeouts. Incurred memory overhead seems to be more or less constant,
though noticeable (about 200M for each node).

The user can disable this behavior by setting environment variable
COUCHBASE_ENABLE_MLOCKALL to 'false'.

The only supported platform currently is GNU/Linux.

Change-Id: I9405ac81d7e2a035bdfdd4805152e91a8ff7502f
Reviewed-on: http://review.couchbase.org/23922
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-6595 Increase erlang mseg allocator cache size.

Default cache size is 5. Our tests show that setting it to a larger
value decreases the number of minor page faults generated by
erlang and somewhat reduces the chances of hitting timeouts.

The value that is used can be overridden by setting COUCHBASE_MSEG_CACHE_SIZE
environment variable.

Change-Id: If32cce298523f184cb79e11742f68ff17fd4147b
Reviewed-on: http://review.couchbase.org/23923
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>