TS-2675: minor metalink refactorings

  - strcasecmp(3) says #include <strings.h>
  - C style casts for consistency
  - Give some variables better names
TS-2675: metalink: add missing TSCacheKeyDestroy
TS-2675: metalink: Reuse TSCacheWrite() vs. TSTransformCreate() continuation
TS-2675: metalink: Handle the end of the input independently from the TS_EVENT_VCONN_WRITE_COMPLETE event from downstream
TS-2675: metalink: Plug memory leaks reported by Valgrind
TS-2675: metalink: Drop redundant TSUrlStringGet()
TS-2675: metalink: Simpler to drop http.HTTPClient where not needed and minor edits
TS-2675: metalink: Fix crash if INKVConnInternal::do_io_close() gets called after a message is already complete
TS-2675: metalink: Send our own TS_EVENT_VCONN_WRITE_COMPLETE event upstream

Send our own TS_EVENT_VCONN_WRITE_COMPLETE event upstream when the
input is complete otherwise HttpSM::update_stats() won't get called
and the transaction won't get logged.  (If there are upstream
transformations they won't get a chance to clean up otherwise!)
TS-2675: metalink: Improve comments and whitespace
TS-2675: metalink: Don't finish computing the digest more than once and test that the proxy rewrites the Location header if the file is already cached
TS-2675: metalink: Reformat comments

metalink: Clarify that we *must* check TSVConnClosedGet(), if only to clean up allocated data
Update CHANGES for TS-2675