openssl: cleanup BIO
openssl: cleanup
openssl: try to cleanup OpenSSL binding after test run
openssl: implement a simple reference manager to free BIOImpls
openssl: a more explicit freeing strategy for BIOImpl refs

We implement BIO_METHOD.destroy and free the global ref there if
there is one. This means BIOs are only freed when BIO.free is called. This
is a good thing because SSL.free may call BIO.free and we want to avoid
race conditions between the GC freeing stuff and explicit freeing.

A corollary is that we use resource lending style for BIO.fromInputStream
which is now called withInputStreamBIO (same for `withBytesBIO`).
openssl: free the native ssl instance when connection gets closed