Quotes and {} audit for variables and strings

Use single quotes, double quotes, and braces when they're supposed to be
used.

-Switched many double quotes to single quotes.
-Removed many unneeded braces.
-Removed quotes when assigning a variable to a variable, as field
splitting is not done during variable assignment
(http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_05)
-Except, however, with local, which varies from shell to shell... so
quote those.
Use slightly more compact format for arithmetic