function wrap(interceptor) {
            var resolve;
            var reject;

            function _clear() {
                interceptor.p = resolve = reject = null;
            }

            utils.merge(interceptor, {
                lock() {
                    if (!resolve) {
                        interceptor.p = new Promise((_resolve, _reject) => {
                            resolve = _resolve
                            reject = _reject;
                        })
                    }
                },
                unlock() {
                    if (resolve) {
                        resolve()
                        _clear();
                    }
                },
                clear() {
                    if (reject) {
                        reject("cancel");
                        _clear();
                    }
                }
            })
        }
Add  lock/unlock API for interceptor.

Once an request/response interceptor is locked, the incoming request/response
will be added to a queue before they enter the interceptor, they will not be
continued  until the interceptor is unlocked.

@param [interceptor] either is interceptors.request or interceptors.response