Improve basic profiler output a little.

If on gcc4, use the built-in demangling functions to present demangled
names in the output where possible.