The Utilization of Shared Energy Storage in Energy Systems: Design, Modeling and Optimization