Clean up CA cert cache for non-file certs

When CA certificates are provided as binary blobs, rather than by
filename (ie, #ssl_options.cacerts is set, but #ssl_options.cacertfile
is not) the cleanup never occurs due to an incorrect pattern match in
tls_connection:handle_trusted_certs_db/1. This causes the table to grow
unchecked because each connection adds a new entry.

This change fixes the cleanup and adds a unit test.