Polarization Effects in Semiconductors: From Ab Initio Theory to Device Applications