Patch #185 introduced a backward incompatibility by changing the arguments
of the `Set*` methods on `Tree`.
This change restores the arguments to what they previous were, and
introduces `SetWithComment` and `SetPathWithComment` to perform the same
action.
This fixes two unmarshalling issues:
1. Unmarshalling into a custom integer/float type (e.g. `time.Duration`).
2. Checks for overflows happen before unmarshalling, erroring if an overflow
would happen.
Apart from this it also reduces code duplication a bit.
A new Encoder option emits arrays with more than one line on multiple lines.
This is off by default and toggled with `ArraysWithOneElementPerLine`.
For example:
```
A = [1,2,3]
```
Becomes:
```
A = [
1,
2,
3
]
```
Fixes#200
Usage is similar to the stdlibs JSON encoder/decoder but I tried to
leave the general structure of the code the same.
Main motivation was to support encoding/decoding options to allow
encoding string-type map keys as quoted TOML keys.
This was implemented on the Encoder with QuoteMapKeys(bool).
> The TOML spec supports using UTF-8 strings as keys.
> https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md#table