Fixed parsing getent output. bnc#813232.

Parsing stripped part of hostname in some cases. I've also added
a check of validity of parsed result.
Updated testsuite.
Updated changelog