A Nearly Optimal and Low-Switching Algorithm for Reinforcement Learning with General Function Approximation