Style improvements, cleans up API, fix memory issues

- More liberal use of static functions to clean up namespace
- General style and code improvements, comments, etc.
- Caught a few memory issues with Electric Fence
- Adds --allow-stderr to TestRunner for use with Electric Fence
- Write REPL history to file
Make sure the scanner gets regenerated if lexer.l changes.
Fixes history file management
Adds octal support to the lexer
Rewrite of parseInt, takes care of a lot of FIXMEs

- Includes a new `testIfFlathead` function to test implementation-specific
  behavior (in this case octal handling). Adds a new `FH_VERSION` property
  on the global object to identify the implementation.
Move all version info to one place.