Cleanup: moved paginated-related code into a separate module
Cleanup: be explicit about comparisons
Get rid of `getViewUnits`

Everything regarding unit/page retrieval is now contained within
`fetchPages`, and works asynchronously as it should from the beginning.

This work makes major changes to the way unit fetching works:
- Several pages will be retrieved within a single request (yay!)
- All unit fetches are asynchronous
- Unit inserting, sorting and index-based browsing has been vastly
  simplified by returning a uid<->index mapping

Quite a bit of unnecessary code has been removed as well.

There are still lots of possible improvements and optimizations, most
notably moving the unit fetching code to the collection of units.
Return translation URLs along with units

Simplifies stuff and avoids nasty client code.
Cleanup: coding style fixes