Clean up library symbol visibility issues.
(based on recent similar OSL symbol visibility fixes)

* On gcc-based systems, use __attribute__((visibility("hidden|default")))
  (in export.h) to clearly mark which symbols must be visible as part of
  the public API (or that must be found by dlsym() in order for LLVM to
  correctly generate code to call them from shaders), versus symbols
  used only internally to the library that don't need to be visible to
  apps linking OSL libraries.  Note that Windows already did this for DLLs.

* For Unix-like systems, if the CMake variable HIDE_SYMBOLS is on (or
  'make HIDE_SYMBOLS=1'), then use -fvisibility=hidden on the compile & link
  lines to control symbol visibility so that the default is to hide symbols
  not marked as part of the public APIs.  (Note: Windows does this by
  default.)  Even if HIDE_SYBOLS=1, the symbols are not hidden for DEBUG
  builds, so that all the symbols are available.

* On Linux, also use linker option --version-script and a custom
  version-script for libOpenImageIO.so in order to force the symbols of
  our dependencies to also remain hidden outside the OIIO library.  This
  is extremely helpful to apps that want to embed OIIO but also embed
  our dependencies separately for other reasons (and not necessarily the
  same versions) -- this makes sure the symbols don't crash when the
  program runs, leading to strange crashes.
Change to newer OIIO_API and OIIO_EXPORT macros
Merge pull request #442 from lgritz/lg-symbols

Hide library symbols, better-named export macros
Fix up error detection and reporting in maketx.
Addresses problems reported by Michel Lerenard.
Targa output fixes
* Ensure that write errors properly close the file handle.
* Clean up a bunch of bugs that was botching the extension area data.
Suggested by Nicolas Burtnyk.
Add comments to clarify TIFF docs
TIFF: Re-enable PREDICTOR_FLOATINGPOINT
ImageCache: More graceful handling of inability to free handles or tiles.
Rather than assert when we seem unable to free handles or tiles fast enough
to stay within the limits, just allow the limits to be exceeded (hopefully
only by a little, and only temporarily).
Minimize non-error cmake output, unless VERBOSE=1.
For ordinary (non-verbose) build, there's no need to clutter the make/cmake
output with details about every package found.  Surround the majority of
non-error cmake messages with if(VERBOSE)/endif().
IC: Detailed per-file stats track number of tile reads per MIPmap level.
This can help track down unusual MIPmap access patterns.
The idea and most of the code came from Thiago Ize at Solid Angle.
Bug fix - maketx did not set all the ImageCache options properly when stats were not requested.
Deal with texture inputs with unassociated alpha without conversion, including
texture inputs are associated but incorrectly are tagged as unassociated alpha.

This comes in two parts:
1. A new ImageCache attribute "unassociatedalpha", which when set to 1 will
   cause image files to be opened with the special configuration option
   "oiio:UnassociatedAlpha", which is recognized by the image reader as
   an instruction to leave unassociated alpha as it is, rather than converting
   to associated alpha upon input.
2. A maketx option --ignore-unassoc, which when used will set this option for
   the ImageCache.

The net result is that 'maketx --ignore-unassoc' will not scale the color
channels by alpha, even if the file appears to have unassociated alpha.
oiiotool & iinfo: bug fix with SHA-1 hash.

We were not doing a seek_image before the read for the SHA-1 hash, so in
the case of a MIP-mapped image, we were pointed to the lowest-res MIP level,
not the highest-res level.  That could result in two images that were quite
different having the same hash if they had the exact same average color.

Note: this did NOT affect maketx/TextureSystem's detection of duplicate
textures, which always hashed the original pixels correctly.

Also put in a check for errors in the read_image call used to read the
buffer that is hashed.
Update testsuite ref output after bug fix
Document IC attribute 'unassociatedalpha' and maketx --ignore-unassoc
CHANGES and other docs updates
Rebuild PDF docs
Incorporate xxhash, Bob Jenkins hash, and the 'fmix' from Murmurhash.
(All are either public domain or BSD licensed.)
Add hash_test to test timings of different hash methods.
Improved hash function for the ImageCache tile cache.
Also make testtex --testhash perform a quality test of the tile hashing.
Add SHA1 class to hash.h to make easy SHA-1 hashing.
In the process, fix a bug where deep data didn't fully include the
sample counts in the hash (vector::size() versus vector::size()*sizeof(elem_t))