Replace anonymous inner class for RowMapper with a closure

There's no test, but running using the CLI worked. Note that because the query method is overloaded for ResultSetExtractor and others, you need to say 'as RowMapper' after the closure to avoid ambiguity.

Sorry about the reformatting. I did that in my IntelliJ IDE.