Add TextHeaders.getAndRemove(...)

See #2649 for motivation