YARN-2699. Fixed a bug in CommonNodeLabelsManager that caused tests to fail when using ephemeral ports on NodeIDs. Contributed by Wangda Tan.

(cherry picked from commit abae63caf9c53b404f2f2db7d482555484eaeaf8)