Replaced deprecated cast.hpp with polymorphic_cast.hpp. Droped dependenc...

...y to the Numeric library.

Tests pass (checked on GCC).