Learning Multi-Object Dynamics with Compositional NeRFs