pdPackager: numerous improvements and optimizations

This was a crucial blocker for further work on themes, so very nice to
have it done!

pdPackages now sport the following improvements:

- Support for second-pass directory and data chunk compression.  When
writing a package to file, callers can now request compression of the
completed directory and/or data chunks.  This is not so meaningful for
PDI files (which only have 10-20 nodes, depending on the number of
layers present), but for PD's forthcoming theme files, which will
contain hundreds of individual icon nodes, this provides large file size
savings on the directory in particular.  This also gives me a way to
test performance and file size differences between compressing each node
individually, or adding nodes uncompressed, then doing one giant
compression pass on the completed package data chunk.

- Much better support for situations where the user has some notion of
expected package size.  In the case of PDI files, this allows us to set
up a reasonably accurate initial buffer, preventing the need for costly
ReDim Preserve statements during PDI assembly.

- Better support for pointers instead of array references.  This means
better performance for the many array transfers required during package
assembly, and a simplified interface with zLib.

- Condensed code, thanks to some new helper functions for data
compression

- Miscellaneous bug-fixes

- Improved and clarified comments