Robust and Nonsmooth Control Barrier Functions Based on Captivity-Escape Games