The Effect of Stellar and Quasar Feedback on the Interstellar Medium: Structure and Lifetime of Molecular Clouds