Resource Allocation Strategies for Cognitive and Cooperative Mimo Communications: Algorithm and Protocol Design