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 backup destination for barn-agent.

Barn currently has a single master destination. This change introduces the
concept of a primary and a secondary destination. When a master is
down the agent will wait a period (currently temporarily hard-coded to 10 minutes)
and then fail over to backup. It will retry master every 10 minutes from
then on.

This change was done because under the current setup barn-agent
has no control over when log files get deleted and the log deletion
time can be as low as 20 minutes which is very short period for a
replacement machine to be brought up.
Merge pull request #12 from soundcloud/conor/barn_updates

Updates to barn-agent.