Population properties of compact objects from the second LIGO-Virgo gravitational-wave transient catalog