Refactor network commissioning setup in Linux example apps. (#27861)

* Refactor network commissioning setup in Linux example apps.

Linux (and Mac) example apps were inconsistent in terms of how they handled
network commissioning, with most of them being buggy in terms of not setting
things up properly on Mac or not setting things up properly at all.

The changes here move the setup into AppMain, so it's handled consistently
across all example apps.

* Address review comment.
diff --git a/examples/chef/linux/main.cpp b/examples/chef/linux/main.cpp
index af41f8b..57e5273 100644
--- a/examples/chef/linux/main.cpp
+++ b/examples/chef/linux/main.cpp
@@ -20,9 +20,7 @@
 
 #include <app-common/zap-generated/ids/Attributes.h>
 #include <app/ConcreteAttributePath.h>
-#include <app/clusters/network-commissioning/network-commissioning.h>
 #include <lib/support/logging/CHIPLogging.h>
-#include <platform/Linux/NetworkCommissioningDriver.h>
 
 #include <lib/shell/Engine.h>
 
@@ -32,19 +30,7 @@
 using namespace chip::Shell;
 using namespace chip::app;
 
-#if CHIP_DEVICE_CONFIG_ENABLE_WPA
-namespace {
-DeviceLayer::NetworkCommissioning::LinuxWiFiDriver sLinuxWiFiDriver;
-Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(0, &sLinuxWiFiDriver);
-} // namespace
-#endif
-
-void ApplicationInit()
-{
-#if CHIP_DEVICE_CONFIG_ENABLE_WPA
-    sWiFiNetworkCommissioningInstance.Init();
-#endif
-}
+void ApplicationInit() {}
 
 int main(int argc, char * argv[])
 {