kakapo-ret-and-indent: delete trailing (and leading) whitespace

E.g., if we have the line

                foo      -!-       bar

and '-!-' is point, and we press ENTER, we should get

                foo
                -!-bar

instead of

                foo
                -!-       bar

.
kakpo-ret-and-indent: predict desired indent on empty lines

If we just press RET on an empty line, do not simply add a "\n" newline
character. Instead, after adding a newline, add some indentation (if any
can be found) also.

This mimics the behavior from Vim.