testapp failure observed when linked against a newer OpenSSL (seen on OSX).

The fix though is not actually a library issue but just an issue with our send
code returning the wrong send length, we must return the SSL_write number,
not the send number (the send number will be bigger as SSL inflates the data
by some amount).

Change-Id: I93f33c9ec791f3f174f624afd8d8adaf6c5f5d48
Reviewed-on: http://review.couchbase.org/40532
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Merge remote-tracking branch 'membase/3.0'

* membase/3.0:
  testapp failure observed when linked against a newer OpenSSL (seen on OSX).

Change-Id: Ib9a6bbb9da92de1fd96272f21b96d302e9dcb9d6
MB-11066: Document mutable config tokens

Change-Id: I2a6d03225e17e3b88a33e327e153ed4cfeb3bf27
Reviewed-on: http://review.couchbase.org/40615
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MSVC does not support %zu

Change-Id: Iedc909a654137cd7b471dbc97edeaf6941d02ecb
Reviewed-on: http://review.couchbase.org/40652
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Merge remote-tracking branch 'membase/3.0'

* membase/3.0:
  MSVC does not support %zu

Change-Id: I6a0bf528ed56fc5ad5944130a1946344d41b2b92
MB-11968: Remove unused functionality

Remove the following unused functionality:
 * daemonize
 * lock memory pages into memory
 * Enable large memory pages
 * Support for creating a pid_file

Change-Id: Ic77e24d3719d149bad836ce7dc2ff867dc07f467
Reviewed-on: http://review.couchbase.org/40646
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-11969 Remove detailed key stats

Change-Id: If4bf7359f5a5fad31e23174f192f0a99f94ab11b
Reviewed-on: http://review.couchbase.org/40649
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Zero dynamic_buffer.size when it is cleared

To assist in parsing 'connections' stats, also reset dynamic_buffer.size to
zero when we reset the buffer pointer.

Change-Id: I1c336f1723d2d52ba184053d1068ad51417d0a0a
Reviewed-on: http://review.couchbase.org/40369
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-11066: Refactor config parsing code to allow parse at arbitrary time

Refactor the memcached config parsing code to prepare for changes to
allow dynamic config update. This patch does three main things:

* Changes all the error handling to pass back a true/false status code
  (and associated error message if false), instead of printing to
  stderr and exit()ing.

* Change the parsing code to pass in a {settings} struct to be
  populated. This allows a new config to be parsed while the current
  config is unchanged - for example to permit verification of a
  proposed config.

* Change the parsing code to move any "handling" of config changes
  (e.g. loading of specified extensions) from the parsing of the
  config. Again, this paves the way for being able to seperate config
  parsing from applying settings to the system.

Change-Id: I23d9c2c1bee33541f41c3c7d696b8dce1c1294c0
Reviewed-on: http://review.couchbase.org/40749
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-11066: Unit tests for config_parse

Add unit test for config_parse functionality. Initially this is to
test the current config parsing.

Change-Id: I8ce6f6311b403336c8f9a041e9ca540fe0919df7
Reviewed-on: http://review.couchbase.org/40750
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix clean build for config_parse on dtrace systems

Change-Id: I6eb572c9362ae229ec05221be3b73fe1777935d7
Reviewed-on: http://review.couchbase.org/40880
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Split the generated test suite into multiple units

Change-Id: I8528603961d106945ad65f97c589fa59903de993
Reviewed-on: http://review.couchbase.org/40877
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Added hack for ancient gcc compilers without proper C++11

Change-Id: I0ace99065432c4e9b90a727065ab4d842fa12fd8
Reviewed-on: http://review.couchbase.org/40899
Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Split the generated test suite into multiple units

Change-Id: I01c28cbc6dd6f193034d3c345e15a8702a7f1606
Reviewed-on: http://review.couchbase.org/40931
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
MB-11066: Add support for dynamically reloading memcached JSON config

Adds the ability for the memcached JSON config file to be reloaded
while memcached is running. Note that only a limited subset of
settings can be changed at runtime - see memcached.json man page for
details of these.

This is achived by adding two new binary protocol messages:
CONFIG_VALIDATE and CONFIG_RELOAD.

* PROTOCOL_BINARY_CMD_CONFIG_VALIDATE - Used to validate a proposed
  config change. Client sends the proposed JSON config file as the
  body of the request, and memcached will check if the changes are
  valid to apply to the running config. If so returns SUCCESS, if not
  EINVAL.

* PROTOCOL_BINARY_CMD_CONFIG_RELOAD - Instructs memcached to re-read
  the original config file specified at startup (i.e. the -C
  command-line option). If the config is valid applies all
  runtime-modifiable settings. Requires admin privileges.

At this stage there is no client support, other than in testapp.

Change-Id: If8c61cb4c083ffc68d2a700692a866f11c6dd318
Reviewed-on: http://review.couchbase.org/40751
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Merge remote-tracking branch 'membase/3.0'

* membase/3.0:
  Split the generated test suite into multiple units

Change-Id: I405806dc2746e894982ddd8ac70e4854355a1830
Merge remote-tracking branch 'membase/3.0.1'

* membase/3.0.1:
  MB-11066: Add support for dynamically reloading memcached JSON config
  Split the generated test suite into multiple units
  Added hack for ancient gcc compilers without proper C++11
  Split the generated test suite into multiple units
  Fix clean build for config_parse on dtrace systems
  MB-11066: Unit tests for config_parse
  MB-11066: Refactor config parsing code to allow parse at arbitrary time
  Zero dynamic_buffer.size when it is cleared
  MB-11969 Remove detailed key stats
  MB-11968: Remove unused functionality
  MSVC does not support %zu
  MB-11066: Document mutable config tokens
  testapp failure observed when linked against a newer OpenSSL (seen on OSX).

Change-Id: I0d14d00ba78f4129f2af024a5bf70cf359a2180b