Handle compressed tars in ApplyLayer

When pulling from a registry we get a compressed tar archive, so
we need to wrap the stream in the right kind of compress reader.

Unfortunately go doesn't have an Xz decompression method, but I
don't think any docker layers use that atm anyway.

This fixes a regression from https://github.com/dotcloud/docker/pull/3207