Untethered shape-changing devices in the gastrointestinal tract