port/chan: read & deliver called with ctx
sharedchan: add constructor + tests
test: refactor globals