Enable testing of barn-agent.cpp.

To test the overall logic of barn-agent log shipping this change
breaks out inherently stateful parts (e.g. filesystem) into objects
that are passed into the functional part so that testing can be
done.
I hope that I've been careful enough with this refactoring that it
is a no-op functionally. I intend to add tests of current functionality
to allow future changing of the code without worrying about introducing
regressions.
It somewhat breaks the style of the functional code to introduce objects,
but I think the only alternative is to mock out global functions. While
possible I think there's still so many stateful like functions that
having a class to just group them is worthwhile.
Rsync + filesystem operations are in one class which is a bit messy but
I didn't want to go too crazy on introducing/passing objects.


@omidaladini @johnglover @gavinmbell