C backend: emit decls sorted by dependencies

The C backend is the only backend that requires each decl to be output
in an order that satisfies the dependency graph. Here it is implemented
with a simple algorithm based on a `remaining_decls` set, using the
`dependencies` edges that are already stored for each Decl.

This satisfies incremental compilation as well as how `zig test` works,
which calls `updateDecl` on `test_functions`.
234d94e42bAndrew Kelley committed on 10/28/2021, 8:21:37 PMparent8e93ec6
1 file changedLine totals unavailable