Turkey and Russia have closed their consulates in the northern Afghanistan city of Mazar-e-Sharif amid Taliban victories nearby.