NiO/MAPbI(3-x)Clx/PCBM: a model case for an improved understanding of inverted mesoscopic solar cells