Indonesia's economy grew a faster-than-expected 5.18 percent on-year in Q2 thanks to higher commodity prices and stronger consumption.