port allocation in echo examples

The udp-echo and tcp-echo examples have been changed so that
the port that the server uses is automatically allocated instead
of being hard coded.  It can still be hard code if desired, it
will allocate a port when set to "0".