Molybdenum chloride double perovskites: dimensionality control of optical and magnetic properties