Conor/barn updates

Refactor barn-agent + introduce a failover handler for destination selection

@johnglover