Effect of medium heterogeneities on reactive dissolution of carbonates