We introduce a new dependencies map so that some resources can depend
on other resources, effectively providing a tree of calls that need to
be included when the user requests a particular call be preserved in
the trim.
For example, a SwapBuffers call depends on the "framebuffer".
A rendering operation makes "framebuffer" depend on "render-state".
Enabling texturing makes "render-state" depend on "texture-target-FOO".
Binding a texture makes "texture-target-FOO" depend on "texture-X".
Uploading a texture makes the current call provide "texture-X".
Creating a texture makes the current call provide "texture-X".
This way, if a particular SwapBuffers call is included in the trimmed
output, all of the above will be included. Otherwise, if a SwapBuffers
is trimmed, then the "framebuffer" dependencies will be cleared and
none of the above calls will be included in the trimmed output.