test_ssh_conn: added unit test for close handling

See GitHub Issue #49.

Signed-off-by: Erik Bernoth <erik.bernoth@gmail.com>
Acked-by: Peter Winkler <winkler@dresearch-fe.de>
Acked-by: Steffen Sledz <sledz@dresearch-fe.de>