Exact linear reduction for rational dynamical systems