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.