Port to Boost.Core demangle()

The change does several things:

- Makes use of the common demangle() implementation in Boost.Core.
- Fixes a memory leak if std::string constructor throws.
- Removes the dependency on Boost.Algorithm.
- Makes the behavior consistent for platforms with and without __cxa_demangle().