net/connection: Reduce usage of #ifdef
net/connection: Reduce usage of #ifdef

Most of present #ifdef can be removed via using IS_ENABLED() macro.

Only small part of cache related logic still require #ifdef.

Fixes #8722

Signed-off-by: Tomasz Bursztyka <ba81a3a719836727e6857ae83462b9f52ec41006@linux.intel.com>

GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,Vudentz/zephyr,ldts/zephyr,nashif/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,ldts/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,nashif/zephyr,ldts/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr