Move some platform-specific functions to a new module

Add module Platform: single interface to functions that depend on the
runtime. For now, the native (existing one), and a dummy one that
constitutes a skeleton for the js one.

All calls to Cryptokit, Z, Calendar (which depends on Unix) in the
command-line tool now go through this module.