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.
This must have been dead code?