jscam: Refactor cam1a.js.

Move generic campaign stuff to libcampaign.js.
Move templates into templates.js.
Rewrite cam1a-ai.{vlo,slo} into cam1a.js.
Add docstrings in libcampaign.js, which are merged
with JavaScript API documentation as a separate section.
jscam: Rewrite cam1b.vlo, cam1b.slo, cam1b-ai.vlo, cam1b-ai.slo.

Update libcampaign.js with new features; fix cam1a.js accordingly.
Fix a few typos in cam1a.js.