Exact Equalities and Thermodynamic Relations for Nonequilibrium Steady States