Transport and thermodynamics in quantum junctions: A scattering approach.