Replacing direct references to the arguments object of functions with rest
parametres prevents the function from being deoptimized while still allowing
use of arbitrary arguments. This may also fix some minor memory leaks related
to mishandling the arguments object.
Before, an options object containing properties and values to be used
was how decorated instances of the class would be created. This meant
the constructor could assign anything you feel like to `this`. Rather
than that, the constructor now assigns a strict set of values, and
methods are redefined in subclasses.
Basic unit tests were added to test if they could be written for after
the final refactor to fix the other memory leak here.
This method would leak its arguments object before. The changes here saved
~30KB of memory from being leaked when running /itemsearch atk, for example.