Fixed so that wings works with new esdl version

This means that we can run wings with erl -smp, and use several
threads on the host computer
Fix texture calls
Prepare for new esdl release.

Needs the new esdl which enables smp emulators, and uses wx opengl code.
Will not work on on mac until new the erlang (R14B02) is released.
Original code for addaptiv subdivision

My first stumbling steps toward an adaptiv solution
Basic subdiv in erlang and opencl (adaptiv code removed)

Hard edges work
Holes and hidden faces fixed
Reworked material handling and moved ref impl to it's own module
Optimized interactive commands for both impls

Avoid doing opencl subdivsion on empty sets (crashes hard).
Opencl subdivision now works with vertex-colors and uv-coords
Optimize speed over memory, and generate smooth normals.

Choose to use bigger buffers to increase parallellism.
Add a preference and cleanup the code
TC don't catch things anymore
Improved error handling in case opencl runs out of memory.

Later we could try do decrease the subdiv level when we run out of memory.
Large models probably don't need that level of subdivsions either.
Fix maximize window on Windows.

The previous hack don't work any more, use the new function esdl.
Fix OpenCL code for non nvidia drivers (mac and ATI)

Removes all warnings and compiles on ATI
Automaticly decrease subdiv level and fallback to erlang when OpenCL fails

When available OpenCL memory is less than required to do the number of
subdivision levels, decrease automaticly.
And if that fails fallback to erlang implementation.
Update proxy when preferences have changed
Fix show 'some' edges when in smooth proxy
Fix hard edges when 'some' edges are displayed in smooth proxy.
Fix error case when no OpenCL is available

NOTE: Several levels of subdivision in smooth proxy can be drawn
This feature can be enabled in Preferences/Misc if OpenCL drivers can be found.
add a centroid calculation using tetrahedral decomposition. tested.