Optimal and Sub-optimal Power Allocation Algorithms for Goodput Optimization in Cognitive Multi-channel Wireless Systems