The Hagedorn - deconfinement phase transition in weakly coupled large N gauge theories