Lowest electronic states of neutral and ionic LiN