Distributed Dynamic Resource Allocation for Cooperative Cognitive Radio