[async] Add flags to wait{,_any,_many}/2 functions.
[async] Add flags to wait{,_any,_many}/2 functions.

Currently only one flag is supported, namely, 'interruptible'. It's
useful when a process that traps exits wants to wait on a
async. Normally, if exit signal arrives during that period of time,
nothing would happen. With interruptible flag passed, wait* will be on
the look out for the exit messages and if it sees one, it will
exit. If the caller wants to do anything in addition to just exiting,
they should catch throw:{interrupted, OriginalExit}.

Change-Id: Ia71c50d00e4176619e9b345d163fecec9f48a07b
Reviewed-on: http://review.couchbase.org/88356
Tested-by: Aliaksey Artamonau <ce14b1c16e0fd654f926118eb8addbec5aff4ffa@couchbase.com>
Well-Formed: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>

membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server,membase/ns_server