Add port conflict detection to the service validation logic.

Part of #974