A review of the barkhausen effect and its applications to nondestructive testing