Handle s3 bug for single image uploads.

s3 screws up for 0 byte files and single image uploads.
The problem is that s3 uploader (EventEmitter) emits the
`end`-event to early while some uploads are still pending.

This fix mitigates the problem by setting a pending variable
that gets checked before resolving the assetUpload promise.

This is not an ideal solution but the problem needs fixing
in the s3-library.

* adapt s3 upload handling due to s3 bug.
Fix: only mark gzipped files as gzip encoded.

We are only gzipping js and css files currently. Thus these
are the only file types that should be marked as gzip-encoded.

Otherwise image uploads won't display correctly when fetched
from s3.

* use getS3Params method to only mark js and css files as gzipped.