Supply and Demand Forecasting-Based Optimal Energy Sharing Strategies for Grid-Integrated Community Networks