A state judge heard arguments on Wednesday on whether chimpanzees can be considered persons with some legal rights, as advocates seeking to free two chimps in captivity on Long Island asserted they were “autonomous beings” and compared their plight to that of human slaves.