[fix bug 1048307] Add JS tests for mozilla-pager.js

Added a base suite of functional JS tests for `mozilla-pager.js`. This doesn't cover absolutely everything, but I think it should cover all the main functionality in terms of configurable options. I didn't want to go *too far* with the tests, but this at least ensures all the correct things are called when they should be.

Would appreciate some r from @jpetto? Also any further tests or suggestions are most welcome. I also found and fixed a minor edge-case bug while putting these together :smile:  
It would probably be better to use `pager.currentPage.index` to verify which page is current.

(You probably didn't use/know about `currentPage` because I forgot to document it. I've added documentation for it in a WIP branch. Coming soon!)