implement handling of GLDebugSwitch: we use glutReportErrors to check for errors in each iteration of the glut mainloop if requested

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1641 7f0cb862-5218-0410-a997-914c9d46530a
Merge branch 'svn/trunk'