Revert r37443 for the moment:
* Code duplication of validity checks between wfIsValidFileName() and UploadForm::internalProcessUpload() -- this guarantees behavior will become inconsistent over time. Move the normalization into a single place.
* The additional chars excluded for Windows don't cover the entire set of illegal chars. There are several more punctuation characters, plus general issues such as all non-ASCII characters.
* Application of filesystem rules based on OS could result in strange inconsistent behavior; alternate filestore backends could support different sets of legal characters.
* No clear reason for the change to wfVarDump(); var_export works just fine and doesn't use the fragile output buffering