Add a small profiling framework

This should help aid in debugging slow parts of cargo by setting the
CARGO_PROFILE environment variable.