Comparative study of Ga- and N-polar GaN films grown on sapphire substrates by molecular beam epitaxy