Endogenous Technology Adoption and R&D as Sources of Business Cycle Persistence