The nonequilibrium thermodynamics of small systems