Fix two issues with the gdb wrapper.

- Add support for C++ functions that contain colons in their name (namespaces/classes, etc)
- Cache some gdb lookups that were very slow for large programs.