libreplace: Add tests for connect and gethostbyname.