Ruby AST: Add #single_line_width to nodes

The #single_line_width method returns width of Ruby code emitted for
given node if it fits a single line, or Float::INFINITY if it doesn't.
Now it is useless, but it will be used by improved formatting algorithm
(see the next commit).
Formatting: Improve the formatting algorithm performance

Before this commit, when a #to_ruby method needed to decide whether to
emit a single-line or multi-line version of Ruby code, it just tried to
generate the single-line version first and if it didn't fit to the
current line (as given by context), it used the multi-line one.

This algoritm worked, but it was exponential (in AST depth), which led
to horrible performance on real-world code, e.g. when there was a lot of
nested arrays. This was so bad that some YaST files didn't compile at
all on my machine (e.g. apparmor-settings.ycp).

This commit introduces a new algorithm. The #to_ruby method now decides
the single-line/multi-line question by calling #single_line_width on the
node (see the previous commit) and comparing it to remaining space on
the current line. This is still exponential in nature, but it's much
faster (we avoid actually generating code for all node's subnodes many
times), plus we can add caching of #single_line_width's result later if
needed. The apparmor-settings.ycp file seems to compile fine now.