Optimization-based Integrated Voltage and Frequency Support for Microgrids using Energy Storage Systems