Bug 1498812 - Part 3: Move scroll position test helper functions into separate file. r=mikedeboer
... so it can be shared across multiple test files.
Also make slightly more use of modern JS features for destructuring objects etc.
Differential Revision: https://phabricator.services.mozilla.com/D15684