A bill allowing court officials to refuse to perform gay marriage duties because of a "sincerely held religious objection" is now law in North Carolina.