Thousands flock beaches as heat advisory issued in San Francisco