Refactor uiamasterscript generation.

Refactor uiamasterscript generation such that variables are generated
for configuration parameters, rather than performing string
substitution.  Simplify .js file concatenation, now that all of the
files can be concatenated unmodified.