The end is in sight for battery cages and gestation crates—and that could be just the start.