#234 Fix unsafe generation of task listing

This PR fixes an unsafe retrieval of ports in the `EndpointsHelper` and `v1.EndpointsResource` classes. If a running task had fewer ports than the `AppDefinition` it threw an `IndexOutOfBoundsException`. Now it defaults to port 0.