Samsung is preparing an escape route from its smartphone business—and into everyone else’s