To combat shoplifters using the five-finger discount, lawmakers took aim at self-checkout. Retailers aren’t happy about it.