Adds snake_to_string method

This method converts a bitvector and a X-I string to a R-L-I string.
Currently the implementation is very ugly.
Simplifies snake_to_string method
Fixes bug: static snake string was modified instead of local copy.
Yet another way to implement snake_to_string
Adds methods to calculate E_a and E_b
Adds real snake base string
Renames demo into snake to keep original demo
restores original demo.rb