test: fix problem with threads test using default library context.
test: fix problem with threads test using default library context.

Also add a new test that deliberately tests the default library context.

Fixes #14720

Reviewed-by: Matt Caswell <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14773)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl