The effects of the dangling bond on the electronic and magnetic properties of AlN nanoribbon