Two-dimensional Ruddlesden–Popper layered perovskite solar cells based on phase-pure thin films