Add test for the BIO_s_mem rdwr->rdonly->rdwr use-case