One of Scotland’s most prestigious golf courses has been told it can no longer host the Open Championship after it voted to keep its ban on women.