Real-time feedback control of the impurity emission front in tokamak divertor plasmas