CA-102753: Fix import handler to respect HTTP content-length

This fix stops gzip waiting for more input by closing the connection to it.
This also fixes the import_metadata handler by closing the connection when
done.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-102753: Loosen requirement for content-length HTTP header on import.

There are times when we cannot know this ahead of time and so this should be an
optional argument.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #1136 from simonjbeaumont/CA-102753-cw

CLEARWATER: CA-102753: Fix import handler to respect HTTP content-length