Add TextHeaders.getAndRemove(...)

See #2649 for motivation
Will take care in another commit.