Add missing header.

The std::function is in functional header,
but it's missing and causes compile errors.
Use tcp socket for msvc on local connections.

The unix_socket_stream is not availible on msvc.