Variational operator learning: A unified paradigm for training neural operators and solving partial differential equations