Inclusive production of two rapidity-separated heavy quarks as a probe of BFKL dynamics