nginx: fix announce service logic to get the port number of server
- since there are multiple ways in which port can be set in the server section, and the order can also be changed, the logic has been updated to handle these conditions while announcing the port number on which server is running
- nginx does not allow adding options to server section, so option mdns which controls whether services have to announced over mdns, has been moved to the global section
- add support for announcing service if non-standard ports are used