zshrc: Using "emulate -L"s in functions where needed
This will allow people to get functions from our setup into theirs, even
if they are using very very uncommon option settings.
Also changing coding style from ${x} to $x in the touched functions.
Writing parameters as ${parameter} is clearer in most cases, but for
single-character variables it is actually harder to read and a lot
clumsier to type. I should probably add the to the policy...
This also contains a few misc changes/fixes that caught my eye while
browsing the file.