[SPARK-3755][Core] avoid trying privileged port when request a non-privileged port

@pwendell, ```tryPort``` is not compatible with old code in last PR, this is to fix it.
And after discuss with @srowen renamed the title to "avoid trying privileged port when request a non-privileged port". Plz refer to the discuss for detail.
Wait, I may be missing something obvious. How is the behavior here (with the `-1024`) different from the behavior in the existing code?