gl.costdistances function

Calculates cost distances for a given landscape (resistance matrix)