MINOR: debug: make ha_thread_dump() and ha_task_dump() take a buffer

Instead of having them dump into the trash and initialize it, let's have
the caller initialize a buffer and pass it. This will be convenient to
dump multiple threads at once into a single buffer.
2 files changed