York County GOP chair resigns after endorsed candidates lose primary