Add tests for duplicate PendingIntent requests

Add tests for requestNetwork and registerNetworkCallback with
PendingIntents that are equal as per PendingIntent.intentFilterEquals.

In such situations, the first request is documented to be automatically
unregistered. This means that the PendingIntent should only be fired
once, instead of being fired for both requests.

Currently this behavior is broken for network callbacks (not for network
requests).

Test: atest ConnectivityManagerTest
Bug: 174237997
Original-Change: https://android-review.googlesource.com/1742073
Merged-In: Ic636c731c71474ef09043d7a26ccfd6e2bb5c39f
Change-Id: Ic636c731c71474ef09043d7a26ccfd6e2bb5c39f
1 file changed