Guaranteed Stable Quadratic Models and their applications in SINDy and Operator Inference