[style] harmonize feature check and header includes (#6399)

This commit harmonizes how the feature config checks are done within
OT core modules. In header `.hpp` files, any related `#if` config
check is done immediately after the `"openthread-core-config.h"` is
included. This way the rest of definitions are skipped over if the
feature is not being used. In `cpp` source files the `#if` check is
done immediately after including the related header file.
diff --git a/src/core/radio/trel_interface.hpp b/src/core/radio/trel_interface.hpp
index ebdd40d..ea9fcf1 100644
--- a/src/core/radio/trel_interface.hpp
+++ b/src/core/radio/trel_interface.hpp
@@ -36,13 +36,13 @@
 
 #include "openthread-core-config.h"
 
+#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
+
 #include "common/locator.hpp"
 #include "mac/mac_types.hpp"
 #include "net/ip6_address.hpp"
 #include "radio/trel_packet.hpp"
 
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-
 namespace ot {
 namespace Trel {