Code cleanup...

- Linted by WebStorm, jshint, eslint.
- Replaced new Array(count + 1).join(string) idiom with EC6 polyfill of
  String.prototype.repeat.
- Converted substring/substr to charAt when getting a single character.
- Converted nested ternary expressions to if/else.
- Converted ternaries that assigned to if/assign.
- Removed tail recursion, it isn't optimized by JS engines.
- Converted overly complex boolean expressions to if/else.
- Version is now 1.0.0-beta.
Changed state to scope, that's what it is.
Cleanup, linted.
Move format-related code to another module.
Config updates.
Use a more robust implementation of String.prototype.repeat.
First pass at cool new formatter.
Also some work on formatting class declarations.