Merge pull request #90 from peterhuene/custom/facts

(CFACT-44) Bind to loaded Ruby (if present) instead of searching.
(CFACT-44) Allow Ruby classes to be instantiated from Ruby.

Currently the Ruby classes implemented in libfacter can only be
instantiated from C++. If one of the classes is instantiated from Ruby,
we fail to associate the Ruby instance with the underlying C++ type.

To fix this, define an allocation, mark, and free callback for each type
we support allocating from Ruby.  The allocate function is responsible
for creating the underlying C++ type when the Ruby type is allocated.
The mark function is responsible for marking referenced VALUEs during
the mark phase of GC.  The free function is responsible for freeing the
underlying C++ type when the GC deallocates the Ruby object.
(CFACT-44) Replace cfacter gem with libfacter Ruby API.

The cfacter gem implementation is unnecessary now that we implement the
Ruby API in libfacter.  Therefore, remove it in favor of directly
calling into libfacter from Ruby.

To implement the gem's behavior, the C++ Facter module implementation
now implements the following methods:

* Facter.flush (and implemented on_flush in resolutions)
* Facter.list
* Facter.to_hash
* Facter.each
* Facter.clear
* Facter.reset
* Facter.loadfacts
* Facter.search
* Facter.search_path
* Facter.search_external
* Facter.search_external_path

Additionally, the logic for loading Ruby facts has moved out of the
collection (where it didn't belong) and moved into the C++ Facter
module.

We now follow the old Facter's loading design of first trying
to load a fact by file name and then falling back to loading all facts
if the fact can't be found.
(CFACT-44) Update for code review feedback.

* Add some comments regarding MRI documentation.
* Add some comments regarding VALUE and the use of "volatile".
* Remove unused rb_undef_alloc_func import.
* Use ranged for loop instead of iterator for loop in chunk.cc.
* Fix resolution::suitable to destruct iterator if user block raises.
* Log failures to canonicalize ruby search paths.
Merge pull request #91 from peterhuene/customfact/fixes

(CFACT-44) Replace cfacter gem with libfacter Ruby API.
(CFACT-68) add solaris socket libraries to compile

Solaris requires -lsocket for programs using socket api. This patch
adds the -lsocket library if the operating system detected is SunOS
(CFACT-68) Add -Wextra only if the platform is not solaris

The gcc built on solaris complains of problems in compiling logging.cc when
-Wextra is enabled in cfacter. This seems related to https://svn.boost.org/trac/boost/ticket/8811
which complains of same errors. This patch turns off -Wextra when the OS detected is SunOS
(CFACT 68) Use struct utsname when referring to utsname

The utsname is a structure exposed in <sys/utsname.h> unfortunately, in
Solaris, there is a global variable called utsname, which makes the use of
utsname as a type illegal. This patch changes the invocation to `struct utsname`
(CFACT 68) Provide a skeletal add_platform_facts

This comes in in CFACT 70
(CFACT-81) Fix LSB major/minor release resolutions in Ubuntu

Prior to this commit, the LSB release facts were not correctly
parsing Ubuntu's release string to collect its major and minor
versions. This commit updates the LSB facts such that a release
string of '14.04.1' will return a major release of '14.04' and
a minor release of '04', if a minor version is specified.
Merge pull request #93 from whopper/release_fix_ubuntu

(CFACT-81) Fix LSB major/minor release resolutions in Ubuntu
Merge pull request #94 from vrthra/fix/cfact-68/solaris

(CFACT-68) enable solaris compilation
(CFACT-51) Link and run cfacter on Windows

Makes it possible to link the cfacter project on Windows using MinGW.
The cfacter executable can run, but produces no facts.