dispose() functions should be idempotent and should be
prepared not to crash or cause a double-free if an unref done from
inside caused a recursive call to
dispose() of the same object.
This patch modifies the
dispose() method to honor these constraints.
Since the double
dispose() call won't actually occur in qtdemux (there
is no cycle detection mechanism that could invoke it to work that way),
this is more of a code cleanup than a user-facing problem fix.