Fix mg_read for situations where Content-Length was not set and all data is already buffered
Adapt unit test for mg_download, so the tested http operations are standard compliant