The ruling puts Italy’s constitutional court on a collision course with the Roman Catholic Church.