Malaysia’s economy expanded as expected in the third quarter, while remaining on track to meet official economic forecasts on a surge in investments and increased domestic spending.