Singapore's economic growth accelerated in the second quarter, with GDP rising 2.9 percent on-year, beating forecasts.