Electronic and thermoelectric properties of the layered Zintl phase CaIn2P2: first-principles calculations