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.
Merge pull request #3 from typingduck/conor/barn_updates

Conor/barn updates