Improvements to byte range handling in StaticContentServer

Reviewed in https://github.com/edx/edx-platform/pull/5246.