Keep public keys in sync when pinned certificates is set to nil

Otherwise this could happen:

```objective-c
[policy setPinnedCertificates:@[certificate]];
[policy setPinnedCertificates:nil];
```

Now the public certificate would still be set from the previous pinned certificate and we could have an inconsistent internal state.