Thompson had his first 20-point effort of the season as Golden State snapped a six-game losing streak