Convert header_lines into a map

Couple of things - 
* Not sure if this approach is better than overloading the comparator with a case insensitive version. 
* Maybe we  should refactor all the *_header_line() into a separate class
This `for` loop is very long.  Since this code was originally written we've adopted an 89-character line limit and moved to C++ 11, so this would be better written as:
```c
for (const auto &line : res.header_lines) {
  ...
}
```