Add -Z debug-info back (fixed upstream).
Fix up some test compile failures.
Client: replace TcpStream with generics for testing.
Remove unused imports.