Anion-templated assembly and magnetocaloric properties of a nanoscale {Gd38} cage versus a {Gd48} barrel.