A police standoff with a man who had climbed a crane in Melbourne has finally come to an end.