Unified Theory of Thermionic and Field Emission from Semiconductors