Rebase of this issue's patch onto current main, narrowed to what main
still misses: 33ccc6188 (#2794) took ye4241's patch and gave apiGet its
read error ("couldn't read GitHub's answer") and its over-cap error, so
the read-error half of ours is dropped here. What is left of ours:
- apiGet refuses a 200 whose body is empty ("GitHub answered nothing"):
without it an empty answer under cacheBody is kept for a 304, and
every later ask of the same URL is answered nothing forever.
- latestRTK read its answer with `body, _ :=`, so a cut-off one came
back as a parse failure or "no version in"; it now says the read
broke, and its cut-short test rides along.
Run: TestAPIGetEmptyAnswer fails without the empty-body check and
TestLatestRTKCutAnswer fails without the latestRTK wrap, both pass with
them; the whole internal/library package passes; gofmt/vet/builds clean.
Generated-by: GLM-5.3-Flash (ZCode)