vici: Return default value for get_int() if message value is empty string

This is the behavior of some strtol() implementations, and it makes sense,
so force it.
threading: Test for pending cancellation requests before select()ing on OS X

This fixes some vici test cases on OS X, where the test thread tries to cancel
the watcher thread during cleanup, but fails as select() does not honor the
pre-issued cancellation request.