An ab initio-based approach to the stability of GaN(0 0 0 1) surfaces under Ga-rich conditions