Optimizing Long-term Social Welfare in Recommender Systems: A Constrained Matching Approach