A Gravitational-wave Measurement of the Hubble Constant following the Second Observing Run of Advanced LIGO and Virgo