Branching Time Active Inference: the theory and its generality