Add support for node context

This allows nodes to request a context to run in that will be passed in to C code and perform().

Part of the multi-gpu changes (#2182)