Vendor some javascript files
Extract JS; fix theorem creation

The theorem create form was submitting as soon as _one_ of the fields
validated. This fixes that bug, and splits out the various javascript
components into separate files.
Allow whitespace inside words in formula fields #1