keystore2: Fix timeout handling

In earlier revisions of the code, RKPD client would wait indefinitely.
This model had an invariant guaranteeing that receiver end of the
oneshot channel is always present when sender is invoked.

With introduction of timeouts, this invariant no longer holds. The
receiver can time out and be cleaned up. This patch makes SafeSender
tolerate this scenario.

Also, attempt to cancelGetKey() if corresponding request for a key times
out.

Bug: 269460851
Test: keystore2_test
Change-Id: I33d80af52b5ab15c2113a140a8bd2beedfe2ff4f
1 file changed