Kfsio lib: make graceful bidirectional ssl shutdown work by invoking SSL_shutdown() immediately second time in the case if the first invocation returned 0. This is need to flip ssl state to read in the case if the first invocation successfully dispatch close notify ssl alert. Detach ssl filter from connection once ssl shutdown completes in both read and write calls in addition to shutdown call.