Begin some refactoring.

Fix the word8Array primitives to raise Size exceptions on bad indices.
Add the word8Array primitives to the type system.  Refactor the
semantics to have 1 do_app for primitives of any number of arguments
(instead of do_app for 2 arg prims, and do_uapp for 1 arg). This will be
more flexible as we start to add more primitives, e.g. array update with
3 args.