lua : rework the way types representing an object with an int id work

this fix bug #9698 where equality wouldn't be true in all case
Have the usermanual in PDF format end up in the build directory, not
the source directory, just like all other formats.
Merge pull request #384 from levitte/usermanual-pdf-in-build-directory

Have the usermanual in PDF format end up in the build directory
remove freetype cmake module - it's not needed and doesn't work with 2.5.1 release
remove explicit libstdc++ linking for libraw on OS X

it's not needed and libstdc++ is replaced with libc++ on 10.9