clatd: move stop_loop() into main.c

* New clang-tidy gives more warnings:
  .../external/android-clat/main.c:136:23: error: 'stop_loop' may not be asynchronous-safe; calling it from a signal handler may be dangerous [cert-sig30-c,-warnings-as-errors]
  if (signal(SIGTERM, stop_loop) == SIG_ERR) {
                      ^
  .../external/android-clat/main.c:136:7: note: signal handler registered here
  if (signal(SIGTERM, stop_loop) == SIG_ERR) {
      ^
  external/android-clat/clatd.h:38:1: note: handler function declared here
    void stop_loop();
    ^

Bug: 179304856
Test: builds, atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I06bad709df2ddded97829833f5e86d72ac282fa3
diff --git a/main.c b/main.c
index 683b507..bfcad48 100644
--- a/main.c
+++ b/main.c
@@ -35,6 +35,11 @@
 
 #define DEVICEPREFIX "v4-"
 
+/* function: stop_loop
+ * signal handler: stop the event loop
+ */
+static void stop_loop() { running = 0; };
+
 /* function: print_help
  * in case the user is running this on the command line
  */