Fixes build instability

Create test helper function to make the tests more readble.
Removes child tasks and makes all protocol tests synchronous.
Merge remote-tracking branch 'upstream/master'
Merges endpoint feature.

Merges commit aa338d4d68 from upstream.
Fixes test socket creation feature to use the lifetime specifier.
Removes commented out code
Removes unused test function
Merge pull request #49 from blabaere/master

Fixes build instability