Walmart is piloting a body-camera program at a set of stores as a safety measure for employees as the retail industry as a whole contends with rising levels of crime and violence from shoppers.