"close" step added to the shutdown of individual socket types

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>