New error handling + Reorganization.

* Added a `GeneratorResult<T>` and a `GeneratorError` type.
* Added a `io_error` and `decoder_error` to be used with `map_err` on a
  `Result`.
* Moved the actual generator logic to `generator.rs` and added an alias
  to the `Generator` struct at the top-level `lib.rs`. So you can do
  `use generator::Generator` instead of `use
  generator::generator::Generator`.
* Added JSON configuration handling. Able to get a `Config` record from
  json with a `Config::from_json(str_containing_json)`. A JSON config is
  optional and all fields are also optional. Defaults will be added
  otherwise.