Resource Allocation and Task Scheduling Optimization in Cloud-Based Content Delivery Networks with Edge Computing