Singapore's trade-reliant economy grew in the second quarter from the quarter before, dodging a recession, thanks to solid gains in manufacturing.