CVS snaps up Fred's specialty pharmacy unit for $40M