improve port finding strategy for task runner

1) Recycle free ports
2) Choose only ports that are free & not used by any other application
Merge pull request #630 from metamx/port-finder

improve port finding strategy for task runner