Simplify ip address validation leveraging socket.

Currently we have a ad-hoc validation of the validity of ip
addresses. Since the standard socket module has a built-in
validator inside inet_pton, we could leverage it.

Change-Id: I6f43556f092d60160860e813b22fcc8660d82a80
Signed-off-by: Antoni S. Puimedon <asegurap@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/11334
Reviewed-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Reviewed-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>