The user can provide checkResource and checkContext functions that
will be called with current resource or context respectively.
These functions should return a boolean to decide whether the module
should be ignored or not.
Now the constructor can accept a single option object.
```
const resourceRegExp = /a_regex/
const contextRegExp = /another_regex/
// before:
new webpack.IgnorePlugin(resourceRegExp, contextRegExp)
// alternative:
new webpack.ignorePlugin({resourceRegExp, contextRegExp})
```
Note that from Webpack 5, only passing an object will be allowed,
so we could encourage people to migrate already.