A swallowable capsule, which passed its first human trials, might one day help diagnose IBS and also track whether treatments work and let clinicians give feedback to patients.