[PATCH v2 05/32] tcp: Better helpers for converting between connection pointer and index