Blockchain Applications, Challenges, and Opportunities: A Survey of a Decade of Research and Future Outlook