Shutdown TLS/SSL connection

If the bufferevent was created with "BEV_OPT_CLOSE_ON_FREE", the SSL connection should be shut down when the bev is released.