swift/ref: Implement invite scan & neighborhood ad/scan
Not yet tested but API implemented, including changes to the API
in ref to use handle in a uintptr map instead of a separate scanId in
a global ref map -- it was an extra layer of indirection.
Also fixes potential leaks of handlers in Swift should an exception
occur during startScan calls, uses alias instead of email, and makes
sure unit tests don't use DISPATCH_TIME_FOREVER to prevent any
deadlocks from preventing unit tests from finishing.
JNI patches come from @razvanm via CL 23685.
4 files changed