We'd like to be able to look up tasks by PID from libdrgn, but those helpers are written in Python. Translate them to C and add some thin bindings so we can use the same implementation from Python.