lib: Make ComponentLibrary usable when called with different this context
lib: Fix bugs in subgraph handling

* input/output argument was inverted in commandstream
Implement handler for subgraph-connect response