Perovskite-Type Thin Slabs: A First-Principles Study of Their Magnetic and Electronic Properties