SQLCommand.java cleanup: whitespace, a few redundancies, a regexp bug

Mostly this is abut standardizing whitespace for readability.
But I had trouble holding back, so you will also find:
   Places where I simplified the code to avoid anti-patterns like:
-- using containsKey to double the number of hash lookups,
-- needlessly avoiding the "for (type element : container)" idiom.
-- other cases of needlessly re-evaluating expressions like array element accesses, regexp match construction and execution (like "matches" followed needlessly by "find"), etc.

I think I MAY have found and fixed a known minor regexp bug -- at the least I made the code more consistent -- by replacing find with matches when looking for a prefix match with explain / explainproc.

I left lots of ugly whitespace in getQuery because I think that it would be easier to rewrite it as 2 functions 
getQuery(true) --> getInteractiveQueries [ slightly simpler for not having to deal with batch mode ]
and getQuery(false) --> getBatchQueries [ MUCH simpler ]

And there's still lots of room for improvement, but I think this is a good start.

If any of the actual logic changes seem the least bit ambitious, I'm willing to back them out for now just to get the whitespace changes in.
That's "my" rule. The coding standards are mute on the subject.
I think that open brace on its own line for control structures is just a waste of vertical space.
I slightly prefer it for methods both in C++ and java.

I also generally like 4-character indents, though I've been leaning towards 8 characters for statement continuations.

I'm pretty flexible about the line break between the "}" and the "else" -- though I'm generally "for" it, in spite of the vertical waste

Skipped spaces around if/while/for/catch keywords really bugs me, too.
I also much prefer a space before a "{" and after a "}" or ";" that it is not at end of line.

I tend to try to match the existing style of a document (if it has a strong ~90% consistency) for each of these cases, but it feels wrong to me -- especially two-character indents or brace-on-its-own-line or the skipped spaces around the keywords.