Adaptive Free-knot Splines and Inference