Use std::min and std::max
Complete the previous commit by also removing the inline min and max
functions defined in HeadSpin.h without breaking (3ds)Max compilation
Use std::swap
There is no benefit to the hsFopen macro
Safer type-punning
Use standard (f)abs functions
Remove some additional usless / unused junk
Move <algorithm> header out of HeadSpin.h
Some fixes for Clang
Merge pull request #452 from zrax/osx_fix

Some fixes for OSX compilation.  Closes #450
Merge pull request #441 from zrax/headspin_cleanup

HeadSpin.h cleanup
Fix for timeval on OSX.
Fix missing header on OSX.
Fix pnUUID linking on OSX. Closes #451.
Rename UniChar to plUniChar to avoid conflict on OSX.

OSX defines a UniChar type as part of the OS headers.
Add HS_BUILD_FOR_OSX definition.