provide API functions to start/stop loop

These should replace the run_event_loop stuff..

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