The Impact of Cooperation on R&D, Innovation and Productivity: An Analysis of Spanish Manufacturing and Services Firms