Strain evolution in GaN nanowires: From free-surface objects to coalesced templates