select: Add new osmo_fd_close() function

This is a convenience helper that will both close a fd, mark it as
closed and unregister it from the event loop abstraction.  In most
cases, you probably actually want to use it instead of manually closing
and calling osmo_fd_unregister().

Change-Id: Icd0933eed6a24edde7cdcb378e138897ecc5332c
diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h
index 9b5f372..2abda2d 100644
--- a/include/osmocom/core/select.h
+++ b/include/osmocom/core/select.h
@@ -39,6 +39,7 @@
 bool osmo_fd_is_registered(struct osmo_fd *fd);
 int osmo_fd_register(struct osmo_fd *fd);
 void osmo_fd_unregister(struct osmo_fd *fd);
+void osmo_fd_close(struct osmo_fd *fd);
 int osmo_select_main(int polling);
 
 struct osmo_fd *osmo_fd_get_by_fd(int fd);