On the Relationship Between Active Inference and Control as Inference