Resource Competition and Host Feedbacks Underlie Regime Shifts in Gut Microbiota