CompilationQueue = function() {
        this._bins = [];
        this.size = 0;

        this.insert = function(level, node) {
            var bin = this._bins[level];
            if (!bin) {
                bin = this._bins[level] = [];
                bin.numNodes = 0;
            }
            var compilation = bin[bin.numNodes];
            if (!compilation) {
                compilation = bin[bin.numNodes] = {};
            }
            compilation.node = node;
            compilation.level = level;
            bin.numNodes++;
            this.size++;
        };

        this.remove = function() {
            var bin;
            for (var level = SceneJS_compileCfg.COMPILE_NOTHING; level <= SceneJS_compileCfg.RESORT; level++) {
                bin = this._bins[level];
                if (bin && bin.numNodes > 0) {
                    this.size--;
                    return bin[--bin.numNodes];
                }
            }
            return null;
        };

        this.clear = function() {
            var bin;
            for (var level = SceneJS_compileCfg.COMPILE_NOTHING; level <= SceneJS_compileCfg.RESORT; level++) {
                bin = this._bins[level];
                if (bin) {
                    this._bins[level].numNodes = 0;
                }
            }
            this.size = 0;
        };
    }
Tracks compilation states for each scene