Refactored, added initial weather-page check

Functionality is largely unchanged save an initial InDesign check that the
front document is a designated weather-page (by looking at the applied
master).

But I have eliminated the use of global variables (except for the API key,
now a property) and the script now constructs records(/objects) to pass
date and InDesign page details to functions.

A lot of redundant and stupid code has been removed or rewritten. Closure
is now used to store previously global variables without them being
redefined on every cycle of a repeat, and two in-handler script objects
have been introduced to allow the use of helper functions within functions.