There is a race between "close" event coming from the server and
"close" command issued from the client.
This is similar to calling close after disconnect, so added tests.
- This leaves just `recordVideos` and `videoSize` options on the context.
- Videos are saved to `artifactsPath`. We also save their ids to trace.
- `context.close()` waits for the processed videos.