What's the latest in the page lifecycle a module can send an HTTP header? For CDN purposes I am collecting the modified times of various pieces on the page and want to set the Last-Modified header to them. What's the latest during a request a Drupal 7 module can call drupal_add_http_header? 

I know the answer but I think this is a very interesting question and I somehow doubt most people would know the answer, so I will leave this open for a few days and then post the answer.

Note

To avoid insane answers like using runkit or doing your own request cycle, I will say the answer is userland PHP only, and less than 10 line of code.
Headers can be sent anytime up until the content is sent to the page which happens in drupal_page_footer(). The whole page is output buffered: _drupal_bootstrap_page_header has the ob_start and drupal_page_footer has the ob_flush.

Headers are also overwritten by default so there is no reason why you can't re-send the Last-Modified header at any point.

So, how about hook_exit() (called from drupal_page_footer just before the ob_flush).