Modernize the ToCss trait and implement it on more things.

It is now based on the `TextWriter` trait: https://github.com/SimonSapin/rust-std-candidates#the-textwriter-trait

It should be used for CSS serialization instead of `Show`.