[mkbundle] Remove Mono.Posix, ICSharpCode.SharpZipLib deps

I want to make execution of mkbundle possible under .NET, and as such
I want to remove unnecessary dependencies.

Mono.Posix is only used for UnixMarshal heap methods; there's NO need
to use these when Marshal can be used.

That leaves DeflaterOutputStream, and it's possible to configure zlib
to accept deflate streams, allowing us to use GZipStream:

	http://stackoverflow.com/a/1838702/83444

Update template_z.c accordingly so that the compressed data works.

Two side results of this:

 1. Increased compression; my (really stupid) test app went from a
    compression ration of 31.39% to 32%

 2. This MAY make things WORSE when running on .NET < 4.5. This is
    fixed in .NET 4.5:

	http://msdn.microsoft.com/en-us/library/system.io.compression.deflatestream.aspx

	Starting with the .NET Framework 4.5, the DeflateStream class
	uses the zlib library. As a result, it provides a better
	compression algorithm and, in most cases, a smaller compressed
	file than it provides in earlier versions of the .NET
	Framework.
Add implementations of atomic functions using gcc atomic ops. Not yet used.
Move atomic.h/atomic.h to utils/.
Fix build break.

5329fab3 requires <sys/uio.h>, which wasn't being included.
Fix the build.