AutoToM: Automated Bayesian Inverse Planning and Model Discovery for Open-ended Theory of Mind