function extractLoaders(entry) {
  if (typeof entry === 'object' && entry.loaders) {
    return entry.loaders.reduce(function(list, loader) {
      return list.concat(extractLoaders(loader));
    }, []);
  }
  else if (typeof entry === 'object' && entry.use) {
    return entry.use.reduce(function(list, loader) {
      return list.concat(extractLoaders(loader));
    }, []);
  }
  else if (typeof entry === 'string') {
    return extractPathAndQueryFromString(entry);
  }
  else if (typeof entry.loader === 'string' && entry.query) {
    return { path: entry.loader, query: entry.query };
  }
  else if (typeof entry.loader === 'string' && entry.options) {
    return { path: entry.loader, query: '?' + JSON.stringify(entry.options) };
  }
  else if (typeof entry.loader === 'string') {
    return extractPathAndQueryFromString(entry.loader);
  }
  else {
    console.error(entry);
    assert(false, "HappyPack: Unrecognized loader configuration variant!");
  }
}
Extract the set of loaders (one or more) from a given a "module.loaders"
webpack config entry.

This does NOT perform any normalization on the query, so the query may be
a string (prefixed by '?' or not) or it may be an object.

Example inputs/outputs:

    // a loader chain
    {
      loaders: [ 'style', 'css' ]
    }
    // => [ "style", "css" ]

    // another loader chain
    {
      loaders: [ 'style!css' ]
    }
    // => [ "style!css" ]

    // a single loader, no query:
    {
      loader: 'babel'
    }
    // => [ "babel" ]

    // a single loader with inline query:
    {
      loader: 'babel?presets[]=react'
    }
    // => [ "babel?presets[]=react" ]

    // a single loader with a query object:
    {
      loader: 'babel',
      query: { presets: [ 'react' ] }
    }
    // => [ "babel?presets[]=react" ]

    // webpack 2: multiple loaders with object / string combinations:
    {
      loaders: [
        'react-hot',
        { loader: 'babel', query: { presets: [ 'react' ] } },
      ]
    }

@param  {Object|String} entry
@param  {?Array.<String|Object>} entry.loaders
@param  {!String} entry.loader
@param  {?Object|String} entry.query

@return {Object|Array.<Object>}