Hostname syntax is validated before resolving it

Fix for issue #120

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Missing include added

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Unused variables removed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Ivan Pechorin added to AUTHORS file

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Hostname lables are not allowed to be empty

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>