lib/standard/text: Move and generalize remove_underscores to Text