Refactor: Add support for async ascii extensions

Change-Id: I6522da6fbad00dc25c21d0b6fd4fc183bd5afb3f
Add a newline if the caller didn't do so
Try to read up to 8k from the notification pipe

A thread may be signaled multiple times before it is scheduled to run
and read it's notification. Instead of having the thread to handle all
notifications one at a time we should just try to execute as many as
possible.
Add reqs_per_tap_event to stats settings
Don't honor reqs_per_tap_event during purging of input messages

The tap log is sent in chunks of messages to improve the network
throughput (sending full packets instead of small packet fragments).
If the consumer starts nack'ing all of the messages we'll end up
in a situation where we don't process all of the nack messages since
we allow the server to send up to 10 times as many requests as we
process input messages before backing off.

We got a finite number of input messages, so we should process
all available input messages if we're backing off.
Reduce the default number of tap events to process

The default number of tap messages to process before switching to the
next tap connection used to be 10k of notifications. If you connect
a high number of tap connections to the server with a large amount of
data to be send (and all of the memory is available in memory) you would
end up in a situation where we wouldn't pay much attention to the input
queue.
Don't run load from the notification context

The connection should only run _one_ "event" cycle when called
from the notification context (to allow it to set up the correct
callbacks from libevent).
Warn if notify_io_complete is called with NIL pointer

Change-Id: I479484c5ac862e368c68cd436007fe8f284d9171
Use reference counting instead of timeout for pending close
Fix problems during shutdown of connections

Change-Id: I015d87e20435ef76d5e0848af6157b0c7bdc7502
Added support for TOUCH and GAT (get and touch)
Fix log level for messages during close
Avoid underflow of curr_conns
Initialize process start time before set_current_time()

Time is relative, memcached time doubly so.  set_current_time() sets
the time relative to the start time, which we didn't know until stats
initialization.  Mass confusion from doing this wrong.
Link basic_engine_testsuite with pthreads on win32
Merge remote branch 'origin/membase_1.6.5.3' into engine

* origin/membase_1.6.5.3:
  Link basic_engine_testsuite with pthreads on win32
  Initialize process start time before set_current_time()
  Avoid underflow of curr_conns
  Fix log level for messages during close
  Added support for TOUCH and GAT (get and touch)
  Fix problems during shutdown of connections
  Use reference counting instead of timeout for pending close
  Warn if notify_io_complete is called with NIL pointer
  Don't run load from the notification context
  Reduce the default number of tap events to process
  Don't honor reqs_per_tap_event during purging of input messages
  Add reqs_per_tap_event to stats settings
  Try to read up to 8k from the notification pipe
  Add a newline if the caller didn't do so
  Refactor: Add support for async ascii extensions

Conflicts:
	basic_engine_testsuite.c
	win32/Makefile.mingw

Change-Id: I8de82c213603f5f6cc0e7b81070dfe83bff8483f
Merge remote-tracking branch 'core/engine-pu' into mengine

* core/engine-pu:
  Reserve/release cookie should be able to return errors
  msghdr->msg_namelen should only be set for UDP
  Add missing header (fixes build on OpenBSD).
  fix tests and warnings under the maxconns change
  `make dist` failed without a BUILD file ;)
  Don't symlink libevent to version.
  Added a blackhole logger to use during testing
  Fix m4/libevent.m4 to pass whitespace test
  Fixed problems when accept returns EMFILE
  Automake fails without a NEWS file
  Use the logger instead of fprintf
  Update the base doc files a bit.
  Removed my Copyright from genhash.c.
  unknown_command _may_ not return data
Merge remote branch 'core/engine-pu' into engine

* core/engine-pu:
  Ensure that we don't reference freed memory
Merge remote-tracking branch 'core/engine-pu' into mengine

* core/engine-pu:
  made stdin_check trigger shutdown on EOL
Merge remote branch 'core/engine-pu' into engine

* core/engine-pu:
  Unregister events if we get callback from closed events