Quadratic Klein-Gordon equations with a potential in one dimension