jsx module system
This patch introduces a module system that works within the framework of
Conkeror's 'require' and 'load', makes no sacrifices in the way of
reloading modular code, and preserves our ability to write modules in
ordinary, idiomatic javascript. It does this by introducing two
conventions: first, that Conkeror module files have the extension '.jsx';
and second, that the rest of the filename can be normalized to obtain the
module name.
By existing conventions, module filenames that have more than one word in
them use the hyphen as word separator. The jsx module system translates
the hyphens to underscores to obtain the module name (since hyphen is not
allowed in js identifiers). The 'feature-name' however, (the argument to
the 'provide' command), matches the filename, using hyphens, because
feature names are strings, not javascript identifiers.
When 'load' is called on a module spec (that is, a string that names a
module, or the relative path to a module) that does not have a file
extension, the search first tries the bare name as given with no
extension, then it tries it with the ".js" extension, and last it tries it
with the ".jsx" extension.