server: New scheme for cleaning up objects on server exit.

Objects stored in static variables can now be marked when they are
created and are automatically cleaned up on exit. This avoids having
to export a bunch of close_* functions.
diff --git a/server/named_pipe.c b/server/named_pipe.c
index ef298bb..c3937b2 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -443,8 +443,7 @@
     return 0;
 }
 
-struct named_pipe_device *create_named_pipe_device( struct directory *root,
-                                                    const struct unicode_str *name )
+void create_named_pipe_device( struct directory *root, const struct unicode_str *name )
 {
     struct named_pipe_device *dev;
 
@@ -459,7 +458,7 @@
             dev = NULL;
         }
     }
-    return dev;
+    if (dev) make_object_static( &dev->obj );
 }
 
 static int pipe_data_remaining( struct pipe_server *server )