Code cleanup for startup config validation.

This is based on the comments for commit: 1cc1cba043aaf2592303d159229b3f495571e7f3.
Functionality to validate IP addresses has been moved to a separate
module: utils.py. This file can include other common functions in the
future.