Improved the build code for generating self-contained js files.

Now there are 2 build files: one for uglified and one for non-uglified
javascript.

Also fixed the loading issues, and removed jquery and jquery-ui from the
package.

Fixes #9.