Fix edges not being added in manage_schema

Edges are not added through `manage_schema()` when the resources they refer to are added in the same `manage_schema()` run. This PR fixes that by flushing the depcache just before `manage_edge()` is called.

I would very much appreciate a backport to release-0.10-x, too. :)