flushing messages in acceptor loop and closing failed ssl connections

This change solves a very regular message accumulation in the ranch acceptor processes as well as an ssl connection handler process leak. This change is running in our production environment currently. Prior to this change the ranch acceptor processes were accumulating around 250 messages per hour and also leaking an unknown number of processes. I believe this change resolves both these problems.