Auto merge of #7397 - ehuss:fix-timing-scale, r=alexcrichton
Auto merge of #7397 - ehuss:fix-timing-scale, r=alexcrichton

Fix some rendering issues with -Ztimings.

- Cap the max width to 4096. This is still quite large, but should help for some large graphs failing to display for using too much memory.
- Don't allow labels to overflow past the right side of the graph.
- Fix issue for very fast builds causing an error because there aren't enough CPU_USAGE entries.
- Fix bug where `split_ticks` would enter an infinite loop (caused by small scale values). Added a counter to abort in case there are any other bugs.

Closes #7392
Closes #7388

tsurai/cargo,rust-lang/cargo,nipunn1313/cargo,tsurai/cargo,vojtechkral/cargo,tshepang/cargo,rustyhorde/cargo,nipunn1313/cargo,rust-lang/cargo,tsurai/cargo,vojtechkral/cargo,vojtechkral/cargo,tshepang/cargo,vojtechkral/cargo,nipunn1313/cargo,rustyhorde/cargo,eminence/cargo,rust-lang/cargo,tshepang/cargo,eminence/cargo,tsurai/cargo,tshepang/cargo,rustyhorde/cargo,tsurai/cargo,eminence/cargo,eminence/cargo,rust-lang/cargo,rustyhorde/cargo,nipunn1313/cargo