The diverse service requirements coming with the advent of sophisticated applications as well as a large number of connected devices demand for revolutionary changes in the traditional distributed radio access network (RAN). To this end, Cloud-RAN (CRAN) is considered as an important paradigm to enhance the performance of the upcoming fifth generation (5G) and beyond wireless networks in terms of capacity, latency, and connectivity to a large number of devices. Out of several potential enablers, efficient resource allocation can mitigate various challenges related to user assignment, power allocation, and spectrum management in a CRAN, and is the focus of this paper. Herein, we provide a comprehensive review of resource allocation schemes in a CRAN along with a detailed optimization taxonomy on various aspects of resource allocation. More importantly, we identity and discuss the key elements for efficient resource allocation and management in CRAN, namely: user assignment, remote radio heads (RRH) selection, throughput maximization, spectrum management, network utility, and power allocation. Furthermore, we present emerging use-cases including heterogeneous CRAN, millimeter-wave CRAN, virtualized CRAN, Non-Orthogonal Multiple Access (NoMA)-based CRAN and fullduplex enabled CRAN to illustrate how their performance can be enhanced by adopting CRAN technology. We then classify and discuss objectives and constraints involved in CRAN-based 5G and beyond networks. Moreover, a detailed taxonomy of optimization methods and solution approaches with different objectives is presented and discussed. Finally, we conclude the paper with several open research issues and future directions.