Self-consistent hard-thermal-loop thermodynamics for the quark-gluon plasma