Improvements to genErrCode.py

There are a number of tweaks:
- Includes a #! line to indicate that it is Python
- Should now work as valid Python 2 or Python 3
- Change comment block to /* */ comments to make it valid C89 code
- Removed the #includes, which are not needed
- Changed the return type to const char *, since it is invalid to modify
  the return value.
- Removed the leading and trailing spaces in the returned strings
- Tidied up some of the whitespace in the generated code
- Fixed the test for Apple platforms to match the test used in cl.hpp
- Change exit code from -1 to 1 (UNIX systems don't support negative
  exit codes, so they wrap -1 to 255)
- Output error message to stderr instead of stdout

I haven't examined the exercises to check whether they depend on the old behaviour of leading and trailing spaces in the return values.