Ensuring that listening_ports results are unique

Fixing #329 
Changed it to use std::find, but the time complexity is the same: http://www.cplusplus.com/reference/algorithm/find/

I'll add a comment to the header declaration.