Configurable indent

The current implementation uses a fixed indent of two spaces. This pull request made that configurable by using
```java
writer.setIndent(4);
```
Default is still 2, to ensure backwards compatibility. Unit test is included.