A majority of the justices seemed likely to side with Catholic Charities, but they debated where to draw the line for religious exemptions.