CCBC-445: Provide synchronous destroy functionality

- This allows lcb_destroy() to run the event loop until no more I/O
  references remain. This is useful for valgrind and similar memory leak
  checkers.

Change-Id: I7dbc16b6a32a0a1261fe51bd7514b129fa170cc6
Reviewed-on: http://review.couchbase.org/38083
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>