Implement Visitor Pattern

And implement `has_symbol` using it. I am still not happy, I tried to possibly simplify the code using templates: https://github.com/certik/csympy/tree/templates, it finally compiles, but tests fail, due to bad casting in `dynamic_cast`. I haven't figured out where the problem is.

Otherwise most of the things are there.