Fix to move apache listen_ports detection

The apache2 cookbook had been moved to include before the logic for port
detection. This code was moved to gather the listening ports before the
cookbook is included to populate the attribute properly.