fix compilation error for linux builds due to missing iconv support

This is required since 3ac41fae4b962ae0bbeacad74a4ccb9a6012d0b2 as the text
codecs are built on Unix-like environments only if iconv support is enabled.
do not share a common build directory during the compilation process

This can be harmful because the shared library and the applications may
be built with different compilation/linkage options and may give an error.
generate native packages for the target linux distribution using "fpm"

For the Debian-based distributions, we use XZ compression which results
in packages which have the same size as the tarballs which were generated
earlier. Unfortunately, there is no support for using XZ compression in
CentOS 5/6 and hence we have to use bzip2 which increases the file sizes
quite a bit (tarballs were around 16MiB while the package is around 42MiB).

All the native packages should have correct dependency information, but it
would unadvisable to install a package on a different distribution as only
the package names are specifed without specifying any version numbers.
refactor the OS X build system to use latest libjpeg/libpng libraries

Earlier, the bundled versions of the above libraries were used, which is
not safe as there might be security vulnerabilities in those versions.
The framework introduced in 9db4dce10d8ba81cb854d6994a842b6c9d149726 to
support building dependent libraries for Windows was reused to download
and compile the latest versions of the above libraries.

In addition, the build system was refactored to use "make install" support
which was introduced in bd16273f806759d82c9f64abaa2c093a76442dad for Linux.
generate native PKG for OS X using "fpm"

On OS X, packages are very limited and do not have the functionality that is
provided by package managers on Linux/BSD systems -- installation is supported,
but no uninstallation. Also, the compression support for packages is very poor
-- a 92MiB package is generated instead of a 14MiB tarball compressed using xz.

Thus, we use a very ugly hack to get the package down to a reasonable size. We
actually create a compressed tarball using xz (as before) and include a after-
install script which decompresses this tarball into /usr/local. To support the
scenario where the end-user might not have xz installed on the machine, a copy
of unxz is also bundled in the package.
include updated VERSION when generating the source tarball

This ensures that the commit hash is included in the compiled version
when a source tarball is generated for a development snapshot.
add script for building of releases for the current platform

Note that this always assumes that you are running on 64-bit OS.