Twisting of quantum (super)algebras. Connection of Drinfeld's and Cartan-Weyl realizations for quantum affine algebras