modules/stream: Reduce video playback startup latency

These fixes considerably reduce video startup latency for common viewers
like totem and gstreamer.

1. RFC 3875 4.3.3. says that a CGI "script MUST NOT provide a response
   message-body for a HEAD request".  At the moment the whole video file
   (which can be several GB) is unnecessarily copied.  This can add
   several seconds of delay and overhead.

2. If the CGI output pipe is closed then the script should stop outputting
   data.  Some clients can GET a URL to parse the headers/length and then
   abort it.  This change can save outputting several GB of data.

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>