message: Fix handling of spawn requests to the local node
diff: @@ -148,16 +148,29 @@ auto middleman_actor_impl::make_behavior() -> behavior_type {
  delegate(broker_, atm, p);
  return {};
  },
  - [=](spawn_atom atm, node_id& nid, std::string& str, message& msg,
  - std::set<std::string>& ifs) -> delegated<strong_actor_ptr> {
  + [=](spawn_atom atm, node_id& nid, std::string& name, message& args,
  + std::set<std::string>& ifs) -> result<strong_actor_ptr> {
  CAF_LOG_TRACE("");
  + if (!nid)
  + return make_error(sec::invalid_argument,
  + "cannot spawn actors on invalid nodes");
  + if (name.empty())
  + return make_error(sec::invalid_argument,
  + "cannot spawn actors without a type name");
  + if (nid == system().node()) {
  + if (auto res = system().spawn<actor>(name, std::move(args), nullptr,
  + true, &ifs))
  + return actor_cast<strong_actor_ptr>(std::move(*res));
  + else
  + return std::move(res.error());
  + }
  // This local variable prevents linker errors (delegate forms an lvalue
  // reference but spawn_server_id is constexpr).
  auto id = basp::header::spawn_server_id;
  delegate(broker_, forward_atom_v, nid, id,
  - make_message(atm, std::move(str), std::move(msg),
  + make_message(atm, std::move(name), std::move(args),
  std::move(ifs)));
  - return {};
  + return delegated<strong_actor_ptr>{};
  },
  [=](get_atom atm,
  node_id nid) -> delegated<node_id, std::string, uint16_t> {
  