change CGI environment for local objects

CGI requires passing the headers from request to the environment
up until now the local Swift object metadata was exposed through regular CGI headers (like CONTENT_LENGTH or HTTP_ETAG)
to give way to better CGI support all these headers were renamed with prefix `LOCAL_`
right now the following headers are exposed that way:

LOCAL_OBJECT - if exists, there is a local object present, if not - no other LOCAL_* vars will be present
LOCAL_CONTENT_LENGTH - size of a file
LOCAL_CONTENT_TYPE- content type of that object
LOCAL_PATH_INFO - path to the object in the format of `/account/container/obj`
LOCAL_HTTP_ETAG - etag for object (md5)
LOCAL_HTTP_X_TIMESTAMP - creation timestamp
LOCAL_HTTP_CONTENT_ENCODING - content encoding, if present
LOCAL_DOCUMENT_ROOT - path to object inside the instance `/dev/device`
LOCAL_HTTP_X_OBJECT_META_* - user metadata headers for object
fix bug in handling gzipped images

quite a tricky bug with gzipped length
was unnoticed because there was also a bug in test code, duh..
did a small rewrite of iterator handling and content_length handling
to make it easier to hunt such bugs in the future
Merge pull request #112 from pkit/bug_fix

fix bug in handling gzipped images
Merge pull request #113 from pkit/cgi

change CGI environment for local objects