Production of pairs of heavy quarks by double gluon fusion