Computational Cosmology and Astrophysics on Adaptive Meshes using Charm