MB-6839: Translate localhost to ip address
MB-6839: Translate localhost to ip address

For single-node option, we need to find the local node from bucket
nodemap. As result, we need to translate both 'localhost' and/or
'127.0.0.1' into public ip address used in ns_server.

Change-Id: I9837085b5c3b2d0ebd6bf1bfa41c16130d1c234e
Reviewed-on: http://review.couchbase.org/21436
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
Tested-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>

membase/membase-cli,couchbase/couchbase-cli,couchbase/couchbase-cli,membase/membase-cli,membase/membase-cli,couchbaselabs/couchbase-cli,couchbaselabs/couchbase-cli,couchbaselabs/couchbase-cli