Learning Causal State Representations of Partially Observable Environments