Joint Power and Data Allocation for Energy Harvesting Cognitive Radio Networks