GoPro is facing bankruptcy as soaring memory costs destroy the unit economics of its discretionary consumer hardware.