Thailand's economy expanded 0.8 percent in the second quarter, as higher government and household spending lifted domestic activity.