A Survey of NOMA: State of the Art, Key Techniques, Open Challenges, Security Issues and Future Trends