Explictly connect server and client through IPv4

On my machine, "localhost" resolves to IPv6's localhost, but as the tern server only listens on IPv4, connections always failed for me.  This patch corrects the issue so that both the server and the client always listen on 127.0.0.1, not "localhost".