Add CMake suport and make libfortuna more portable

Some compatibility implementation for functions not present on Windows are added from Postgres repository. The code compiles now also in Linux and a CMake script is added to perform the makefile generation. Also a utility FindLibfortuna cmake CMake module is added.

Unfortunately this port was not tested in a FreeBSD system, but it worked right out of the box in Linux (Ubuntu 13.04 and 14.04) and also in Windows XP 32 bits and WIndows 7 64bits.