unix, windows: getnameinfo implementation

Closes #852