What do GFlowNets and Variational Inference Have in Common?