This extends the `NodeInContext` and `SocketInContext` types with some useful methods to reduce boilerplate when using them in #132219. Also it moves the inline functions to the bottom of the file to make the API easier to read. Pull Request: https://projects.blender.org/blender/blender/pulls/132276