Fix allowable Unix ports range 1024 - 65535

The well known ports / system ports are actually only in the range
between 0 - 1023. The port 1024 should be usable. Also now handles the
max allowable port of 65535.

Change-Id: I5ec944abfe40156467ac53b9f5731a0aa6776596
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Handle more specific BindException and IOException

It is good pratice to handle specific exceptions rather than using the
catch all generic Exception.

This code change handles the java.net.BindException such that if an port
is already in use we skip creating the simulated device on that port.

IOException will display the failure message and exception and not cause
additional attempts.

Change-Id: I7cbf3aa7016b0589f8fdd3f6476006954068a9a0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Merge "Fix allowable Unix ports range 1024 - 65535"
Merge "Handle more specific BindException and IOException"