Virginia professor who said sexual attraction to children isn’t always ‘immoral’ resigns