Feynman’s Approach to the Polaron Problem Generalized to Arbitrary Quadratic Actions