Makefiles: Allow installation into a user-configurable library directory

Distributions often need the ability to redefine the installation layout.
For example, "lib64" is a common subdirectory for shared libraries on
x86_64 Linux distributions.  Add a $LIBDIR Makefile variable so that
the library subdirectory can be specified on the "make" command-line.

Signed-off-by: David Aguilar <davvid@gmail.com>
Limit buffer size when using alloca.  Fixes read crash when reading large 3dcoat ptx files.
Added PtexPtr::reset method, suggested by Sebastian Thiel.
Fixed critical threading bug when using a cache per thread.
Bugfix: was skipping the highest mipmap level on non-quad subfaces.
Limit buffer size when using alloca.  Fixes read crash when reading large 3dcoat ptx files.
(reapply patch af420 inadvertently dropped in c29fe)
Bugfix: crash when generating reduction from tiled triangle texture w/ no stored mipmaps.
Added cmake support.
cmake fix - add correct library reference for tests and utils targets.
Add conditional for WIN32 to export the symbols
for correct linkage
Merge pull request #3 from nyue/master

Fix for Win32 build
Trivial change for gcc 4.7 warning.
Explicitly set read buffer size to 8k in default IO handler.

Some file systems were causing the buffer size to be as large as 512k
per file handle and this was using an inordinate amount of memory.  8k
seems plenty and can be tuned in PtexIO.h if desired.
Use float precision (avoid float/double conversions).
Remove LOD bias on bilinear filter.
Renamed formal parameters to silence -Wshadow downstream
Remove dynamic casts.
Adding a -c flag to ptxinfo that performs a sanity check of the face
adjacency data in the given ptex file. Any inconsistency found is
dumped in the terminal stderr.
fix the subface adjacency logic - Brent wrote:

8<================================

That said, the ptex library doesn't assume prman orientation of subfaces.  The
general rule is that if a subface points to a non-subface neighbor and the
neighbor points back to the subface, then it's in the primary position; if not
it's assumed to be in the secondary position.  In the secondary position, the
neighbor on edge e must point to the neighbor on edge (e+1)%4.

Expressed in code:
if (finfo.isSubface() && !adjf.isSubface()) {
   // neighbor face might be pointing to "other" subface
   if (oppfid == finfo.adjface((e+1)%4)) continue;
}
Merge pull request #5 from manuelk/master

Add face-adjacency consistency check, ptxinfo -c