Port of a concave hull algorithm from nredko's rough implementation.