Reduce type and header visibility

We've previously been very careless about this.
Pass strings by const reference
Do not pass config as shared pointer

This has the additional positive effect of getting rid of the final
boost shared_ptr usages.
Further C++11 style for loops
Increment version to 3