y2r_spec.md: Remove TODO about string encoding

The TODO is was longer relevant because we add encoding header to all
generated files since 71e3f169c6d14b89e4678723ad2c41ffafa6e651.
y2r_spec.md: Allow using code fragments

This makes the spec shorter and eliminates lot of code duplication.
y2r_spec.md: Put code fragments into a wrapper functions

This allows us to get rid of the "@" signs on many places.