Move the CTLogManager class into its own file.

Some minor refactorings done at the same time, like using boost::scoped_ptr, and making it non-copyable.

Trying to wrap my head around everything, having fewer things to look at makes it easier. :smiley: