Refactor HTTP string utils into str.[hc]

Improve "str.h" layout and commenting.  Re-implement hexvalue().