test/helpers: Make MockSelection a normal constructor

This commit makes MockSelection a normal constructor function rather
than a CoffeeScript class, in order to make automated translation to
JavaScript easier in the immediate future.
test/spec/core: Replace classes with functions
test/spec/storage: Replace classes with functions
test/spec/ui: Replace subclass with Widget.extend