Win-stay-lose-learn promotes cooperation in the spatial prisoner's dilemma game