Implement more thorough shell command line escaping on Windows

On Windows, when a command is specified as a list, it's executed via a
batch file. Previously, the shell escaping being done in the process
was quite minimal (only pipes were being escaped), and not entirely
correct (for example, an argument of 'a | b' would get escaped to
'"a ^| b"', which is wrong, since the shell ignores carets inside quotes.

This commit expands the escaping logic to cover all shell special
characters that I know of. For compatibility I kept the exception
that lone pipes are not escaped (although I'd rather I hadn't).

I expanded the test for the embedded pipe symbol into a more generic
special character test, and made it no longer Win32-only, since on any
platform it doesn't hurt to check that special characters in arguments
are correctly passed through.
Use win32_batch_quote in shell_quote
slave: print used signal to kill process in logs
Small fix in comment for 'codebase'.
Merge pull request #1102 from enribop78/comment-fix

Small fix in comment for 'codebase'.
Revert "Merge varunsharma/buildbot:master (PR #1097)"

This reverts commit c39caeed39c251f15d4a0102cee1a5af95778d49, reversing
changes made to 66784b87b7991f470f9dce5206894737e154c3aa.
Rename props.has_propkey back to props.has_key

This was renamed in 03e1d28, but that was too much.  Pep8 was only
complaining about calls to has_key when 'in' is better.
Try_Jobdir: fix a race condition

Wait for the sourcestamp to be written in the database before adding a buildset
that refers to it.
Merge delroth/buildbot:tryjobdir-race-condition (PR #1108)
Merge branch 'master' into nine

Conflicts:
	master/buildbot/schedulers/trysched.py
	master/buildbot/status/mail.py
fix pylint errors
Merge branch 'master' into nine
Merge SpecLad/buildbot:win32-shell-escape (PR #1095)

+autopep8
+add r prefix to punctuation string
Merge branch 'master' into nine
Merge lewurm/buildbot:printusedsignal (PR #1096)
Merge branch 'master' into nine