Data-driven modeling and control of dynamical systems using Koopman and Perron-Frobenius operators