Continued fix for #197, from PR #237.

Fixed timeout failures and rebased to current master.
All socket tests were splitted up again because the combined version has become bloated. It can be combined again
if better grouping is desired.