Search for dark matter in events with heavy quarks and missing transverse momentum in pp collisions with the ATLAS detector