Implemented cmake build for IDE.

Only on windows and linux so far, not yet tested on windows.

It also adds a new CMake/PolycodeDependencies.cmake that does most of the work of finding and linking polycode's dependencies for you. New cmake projects can just use this, and if something changes about polycode dependencies, we need only update one file.
Fixed Windows scrollwheel events
Fixed line endings when pasting into the IDE on Windows
Added scrolling in UITextInput with scrollwheel
Fixed a bug in the IDE cmake file.

Used copy instead of copy_directory to copy the Standalone/ dir.
Small mingw compile fixes
Added clipboard support on linux using X11.

We're still using SDL1.2, but now some functions use X11, so if we every fully switch to X11, we can keep at least some of the code.

Courtesy of http://www.libsdl.org/projects/scrap/, which was gratefully released into the public domain.
Fixes windows headers to use the exact mingw capitalization.

This is necessary for cross-compilation on linux, as linux treats different capitalization as different files.
Removed a huge unnecessary MinGW hack.

See Toolchain-mingw32.cmake for a better solution.
Make CppHeaderParser script ignore "using" statements

- It doesn't handle them properly and instead assumes they're
  an ivar.
Make IDE build on OSX when 10.6 SDK isn't available

- More recent versions of Xcode no longer ship with the
  10.6 SDK so the default SDK setting of 10.6 causes an
  error. This change makes it build with whatever is
  the latest SDK on whatever Xcode is being used
  but sets the deployment target to 10.6 so that it
  will run there as well.
Add Vector2 version of hitTest()
Make initial hitBox size match initial width/height

- Otherwise it's possible to have a clickable entity
  with zero size by default which seems like something
  you don't want as a default behavior.
Make sure all UIElements descend from UIElement

- This way they all get the same default positionMode
  since they're all positioned as if they're TOPLEFT
  but these UI classes weren't descended from UIElement
  so their default positionMode was CENTER. It just
  happened to work because they themselves weren't
  displayed. Fixing this provides the knowledge needed
  to produce a proper concatenated screen position matrix.
Remove redundant removeAllHandlersForListener() in dtor

- Already called at top of method.
Remove need for parentAdjust in _onMouse*() methods

- hitTest can now be used without parentAdjust.
- Make getScreenConcatenatedMatrix() to return a matrix
  that can be used to produce screen coordinates.
- Rename local "transformMatrix" variable to "screenMatrix"
  so we're not hiding the "transformMatrix" ivar.
Add definition to suppress min/max macros on Windows

- When you include windows.h it will define a pair
  of min/max macros. This becomes a problem when you
  want to use the min/max defined as templates in
  <algorithm>. The templates are preferred as you
  only calculate the values of the arguments once
  rather than the two times that the macro does.
Fixed an error in the IDE linux Makefile

I was adding -lX11 to SRCS instead of LDFLAGS
Protect material file loader from crashing if an incorrect path is found
Add the filename to some file loading error messages

- Helps to see what the problem is when upstream callers
  don't check errors.
- Add a check for an empty filename in
  MaterialManager::createTextureFromFile().
Add Init() method to Renderer

- moved the GL scissor disable to Init() because
  until setVideoMode() is called there may not be
  a valid GL context. This can happen, for example,
  in OS X if your PolyCocoaView isn't initialized
  from a nib and instead from code. Calling GL
  without a valid context can crash.
- Replaced calls to initOSSpecific() with calls to
  Init().
Use given size as initial text input scroll container size

- If we've got a size from the caller we might as well use
  it as the scroll container size. It's more generally
  usefull than arbitrary values. Otherwize a multi-line
  text input would always need to have it's size adjusted
  even though it's size was given in the ctor.