Kernel-Based Approximation of the Koopman Generator and Schrödinger Operator