Ab Initio Study of Confinement and Surface Effects in AlN Nanowires