=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
Merge pull request #1691 from akka/wip-3389-fix-ssl-engine-shutdown-2.2-ban

=act #3389 Improve SSL closing sequence (backport)