[components] Generalize Breakpoints StartComponentTree

Prior to this CL, there was no way for a realm to guarantee it can install
breakpoints prior to its children starting. This CL generalizes the
breakpoints StartComponentTree API such that it applies to every realm
that requests a BreakpointsSystem.

This CL makes a number of refactors in order to support generalized
StartComponentTree.

1. BreakpointSystem => BreakpointSystemFactory,
   ScopedBreakpointSystem => BreakpointSystem.

   ScopedBreakpointSystem is no longer a special case. All instances of
   BreakpointSystem have an optional scope. Instead, we have a
   BreakpointSystemFactory that constructs a BreakpointSystem when a
   component is resolved that requests the BreakpointSystem. A
   breakpoint is set on `ResolveInstance` within that scope preventing
   children from starting up until StartComponentTree is called within
   that scope.

   BreakpointSystemFactory maintains a mapping from
   Option<AbsoluteMoniker> => BreakpointSystem at `ResolveInstance`
   time. When requested by the realm's root, that instance is used to
   serve the requests coming from the component.

2. Internally, BreakpointSystem holds onto an `InvocationReceiver` for
   `ResolveInstance` until StartComponentTree is called. At that time,
   the receiver is simply dropped permitting children to be started.

3. In BreakpointSystemClient, `start_component_manager` is renamed to
   `start_component_tree` and now applies to all levels.

4. `bind_single_instance` now calls `Realm::resolve_decl` to resolve the
   `ComponentDecl` because it may dispatch a `ResolveInstance` event.
   `ResolveInstance` events are expected to always be dispatched before
   `BeforeStartInstance` events.

5. Components that use the BreakpointSystem must now explicitly call
   `start_component_tree` if they expect their children to be started.

Change-Id: I86bfec7f17cce9f2928623ae3ac4d33258c405de
28 files changed
tree: 7dd802c5ed056f5f31f60c89a81a217fc80432c1
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. peridot/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .dir-locals.el
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.