Fix more race conditions.

In the old NXP JNI:
- We can be in the process of discovering a tag/p2p target
  when we try to configure discovery. In case ConfigureDiscovery
  returns BUSY, don't immediately call abort(), but retry a few
  times.
- Completely disable Tag/P2P discovery *before* opening a pipe
  to the SMX. This avoids nasty races with opening the SMX
  while a P2P/Tag device enters the field.

Bug: 8552749
Change-Id: I433a40c918373c661abda3bc40dd36db7b233245
2 files changed