groovysh Autoindent for buffers, currently fixed at 2 spaces.

The current buffer is lexed using the default Groovy Lexer,
which keeps track of parentheses in a stack, using the depth of that stack.

Dedents after closing brackets (does not consider multiple closing brackets).

Also had to use a hack-ish solution wrapping the InputStream because JLine
does not provide an API to do autoindent.