Equidistribution-based training of Free Knot Splines and ReLU Neural Networks