Optimize nodemoves()

    Maintain sets for the instruction, so that we don't
    have to do lots of O(n) lookups. Those are slow.
Merge https://github.com/oridb/mc