Ensuring that listening_ports results are unique
using std::find instead of manual iteration
adding a comment denoting performance
Merge pull request #349 from facebook/329

Ensuring that listening_ports results are unique