Electronic and optical properties of rock-salt aluminum nitride obtained from first principles