A discrete adjoint framework for turbulent hypersonic flows in thermochemical nonequilibrium