CLVM improvements, basic history functionality

Implemented a basic version of the history script along with some
improvements for using the new CLVM infrastructure.