Buffer memory strategy

Rewrote the whole memory allocation strategy for buffer.
Now data is preserved even in case of failures.
Printf now returns 0 to signal that a retry is needed.
Memory is allocated as it is needed, not by increments.
RefCount memory allocation

Forgot to check one memory allocation when attaching ref_counts.
Memory cap for buffer

Each buffer instance has a memory cap, thus avoiding using all the memory in
one go.
Boundary condition fix

If the size was exactly BUFFER_SIZE, then we were susceptible of
suffering a buffer overrun. This commit fixes that and introduces
unit tests to make sure this never happens.
Merge pull request #295 from cduclos/master

Buffer implementation with a better memory allocation.
Remove struct Bundle intrusive list, replace with Sequence
Fix segfault caused by removal of Bundle intrusive list, my bad
Change prefix Sequence -> Seq to save typing
Remove Body intrusive list, replace with Seq
Fix for a one-off error

Ubuntu 12.10 apparently introduced some buffer initialization checks which were not present in Ubuntu 10.04.
This uncovered the fact that I forgot to initialize the last byte of the array (outside the for loop).
Merge pull request #300 from cduclos/master

1-off error
Implement automatic discovery and bootstrap for cf-agent.

cf-agent discovers policy servers using Avahi implementation of Zeroconf protocol
at runtime using dlopen.

If a single hub is discovered cf-agent will automaticaly bootstrap to it.

If there's more than one hub discovered cf-agent will print a message listing
available hub and ask user to manualy bootstrap to a proper IP address using
--bootstrap --policy-server <right IP address> command line option.

To use automatic bootstrap --bootstrap/-B command line option is required without
specifying the IP address.
Implement generation of Avahi configuration file.

Add new command line option to cf-serverd -A. cf-serverd executed
with this option will generate Avahi configuration file in
/etc/avahi/services and restart avahi-daemon to make policy server
discoverable over the network.
Register atexit function to close loaded library.
Check if avahi is installed on the machine while running configure.
Use generic linked list for storing information about found hosts.
Check if two hosts found have the same hostname.
General code cleanup.

Remove unused function isIPv6.

Remove unused structure.

Fix definition of HostProperties structure.

Move PrintList function to public header.

Remove unused definitions of functions.

Replace printf functions with CfOut.

Fix indentation.

Remove error string from CfOut messages.

Remove unused variable 'tried'.

Change output type from cf_inform to cf_reporting.

Code cleanup.

Use ListIteratorData instead of direct dereferencing if iterators.
Search for env variable to find avahi library.

If avahi is installed in non-standard location use env variable
AVAHI_PATH to specify location of libraries i.e.:

AVAHI_PATH=/lib/libavahi-client.so ./cf-agent -B

If not specified cf-agent will look for libraries in default locations.
Add unit test for automatic bootstrap.

Test cases covered:

1. No hubs found.
2. One hub found.
3. Multiple hubs found.
4. Avahi error occured.