Secretary problems, prophet inequalities, and contention resolution schemes