Some more changes, but still not working on FxOS (some races, wtf)
Add generic tcp-socket api