core: guard TCP stats on availability of linux/tcp.h and struct tcp_info
Detect availability of linux/tcp.h and struct tcp_info at configure time and build TCP statistics code conditionally based on that.
This replaces platform-specific conditionals with proper feature checks and avoids build failures on systems lacking Linux TCP headers or types (e.g. non-Linux or cross-build environments).
When TCP_INFO support is unavailable, the TCP stats code is compiled out, while keeping the public API intact.
No functional changes on systems where linux/tcp.h and struct tcp_info are available.