Seldonian Reinforcement Learning for Ad Hoc Teamwork