A pointwise regularity theory for the two-obstacle problem