Move `derez` outside of `cycle.decycle` scope

This makes `decycle` a lot faster:

    simple: 10ms
    2 sub: 47ms
    3 sub: 88ms
    array: 99ms

Before:

    simple: 28ms
    2 sub: 57ms
    3 sub: 95ms
    array: 113ms