Bug #18972 reports that the math used
django.core.servers.basehttp.ServerHandler.write to break large data
into chunks before writing is incorrect, but since an array slice whose
end exceeds the array's length automatically truncates, nothing actually
breaks because of this mistake.
This commit adds a unit test that verifies this and allows for easy
refactoring of the chunking code.