Nitrogen vacancies as a common element of the green luminescence and nonradiative recombination centers in Mg-implanted GaN layers formed on a GaN substrate