nwrap: Use hash for host search query

This commit is draft now. Lot of memory leaks left.

Leaks solved:
	* getline
	* strtolower (i hope)

Signed-off-by: Robin Hack <hack.robin@gmail.com>