Fix TLS certs store deletion on concurrent access
During initialisation or reconfiguration, it is possible that multiple threads are trying to create a TLS context and associated data (like TLS certs store) concurrently. In some cases, a thread might be too late to add newly created data to the TLS contexts cache, in which case it needs to be discarded. In the code that handles that case, it was not taken into account that, in some cases, the TLS certs store could not have been created or should not be deleted, as it is being managed by the TLS contexts cache already. Deleting the store in such cases might lead to crashes.
This commit fixes the issue.
Closes #4464 (closed)