A Cloud-based Smart Metering Infrastructure for Distribution Grid Services and Automation