[composer] Ruler fixes and improvements

Here's some fixes and improvements for composer rulers. This improves the appearance of rulers by adjusting the scale logic and by adding smaller ruler divisions, and by making vertical rulers use rotated text. I've also fixed the issue where ruler text is sometimes truncated. There's also a new composer action for hiding/showing rulers.