Non-equilibrium thermodynamics of thermionic emission processes in abrupt semiconductor junctions, including the effects of surface states