JCPenney security officer says he had to resign to avoid firing after stopping thief