Asymptotics of the ground state energy of heavy molecules in self-generated magnetic field