Use in_localip() instead of handmade implementation.

MFC after:	1 week
Sponsored by:	Yandex LLC