Re-implemented type name demangling.

The new implementation does not depend on Boost.Units and is fully contained in Boost.Exception.