connection_t: allocate legacy context on first use