Add TextHeaders.getAndRemove(...)

See #2649 for motivation
Same as above