=act #3389 Improve SSL closing sequence

* Port of this fix in Spray by @jrudolph from this pull request https://github.com/spray/spray/pull/400