Allow clients to disable coroutine support

This commit allows clients to opt out of the boost coroutines in
asio::connection.  This was added later after the initial development of
the asio bindings, and imposes unfortunate handler requirements upon
clients, namely, that boost coroutines will not compile when exceptions
have been disabled via -fno-exceptions.  For clients wishing to disable
exceptions, this is unfortunate, and prevents binary size optimizations
like:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841

Therefore, this patchset allows clients to define
SDBUSPLUS_DISABLE_BOOST_COROUTINES which prevents
sdbusplus::asio::connection from pulling in boost/asio/spawn.hpp, and
disallows the use of yield_method_call (which requires a yield context).

Tested:
Compiled with
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841 and observed
a good build.  See the aforementioned patchset for why this is useful,
but TL;DR, it reduced the binary size of bmcweb by ~30% for no lost
user-facing functionality.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5339c3ff288b333fb0466fb2e6ac00f5b65964b4
diff --git a/include/sdbusplus/asio/connection.hpp b/include/sdbusplus/asio/connection.hpp
index 286a352..2bb4880 100644
--- a/include/sdbusplus/asio/connection.hpp
+++ b/include/sdbusplus/asio/connection.hpp
@@ -25,7 +25,9 @@
 #include <boost/asio/io_context.hpp>
 #include <boost/asio/posix/stream_descriptor.hpp>
 #include <boost/asio/post.hpp>
+#ifndef SDBUSPLUS_DISABLE_BOOST_COROUTINES
 #include <boost/asio/spawn.hpp>
+#endif
 #include <boost/callable_traits.hpp>
 #include <sdbusplus/asio/detail/async_send_handler.hpp>
 #include <sdbusplus/message.hpp>
@@ -212,6 +214,7 @@
                                 objpath, interf, method, 0, a...);
     }
 
+#ifndef SDBUSPLUS_DISABLE_BOOST_COROUTINES
     /** @brief Perform a yielding asynchronous method call, with input
      *         parameter packing and return value unpacking
      *
@@ -306,7 +309,7 @@
             return responseData;
         }
     }
-
+#endif
     boost::asio::io_context& get_io_context()
     {
         return io_;