Enhancements to common/ package.

- improvised GetLocalIP()
- added test case for IsIPLocal() and GetLocalIP().
- cleaned stats-path functions from stats.go
- fixed govet and golint errors

Change-Id: I49869f39791d41800bd9c87dd9372cd773b9ffcc
Reviewed-on: http://review.couchbase.org/43279
Reviewed-by: Deepkaran Salooja <deepkaran.couchbase@gmail.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>