Update barn documentation.

These are some updates after looking at barn for a bit.
Add gtest code to barn-agent.
Add the beginning of tests to barn-agent.

Also fix code comments.
Merge pull request #1 from typingduck/conor/docs

Update barn documentation.
Merge pull request #2 from typingduck/conor/gtest

adding gtest and tests
Change behaviour of barn-agent on error.

Currently barn-agent waits for an inotify event after a sync error
occurs. This could be dangerous if no new log lines come after
a failure to send logs. This change makes barn-agent sleep instead.
No-op refactor of barn-agent.cpp

This change moves the code around so that all error handling happens
in a single place. There should be no functional change with this,
but will allow adding failover on error behaviour in future.
Some more barn-agent refactoring.

* Introduce the concept of a 'channel' which is a source/destination
pair. The will facilitate dynamically changing the destination address
in future.
* Remove completely the passing around of BarnConf and replace it with
a 'Metrics' service that removes some of the boilerplate in calls.
Refactor barn-agent.cpp

This is the final of 3 refactoring commits. The changes should not
have any functional changes, just change the code layout.
This change tries to make the barn-agent main loop easier to read
and to modify.
Add a channel selector that fails barn over to backup node
if the primary is down for greater than 10 minutes.