Fixes required for OSX support.

- mysql/mysql.h is not a valid assumption, not only on OSX but also on some other linux/bsd systems. There has been a similar issue on github before.

- the folly changes are pretty drastic, it is the result of:
-- merging folly HEAD into hiphop-php
--- applying the OSX patches (https://github.com/facebook/folly/pull/27)
--- add additional patches such as checking for GNU indirect function support
--- removing some of the experimental stuff that requires linux-specific includes (such as ELF)