The Japanese economy managed to continue growing for a second straight quarter thanks to a recovery in consumption.