WebGL support (take 2)

Hi, it's me again :)

This time I've streamlined the changes in order to blend in with the rest of the library. Hope you can pull this in or at least a part of it. It is becoming hard for me to keep this fork synchronized for this relatively small changeset and I wish to dispose of it :)

If you still think that this is not good enough, let's talk about what can be pulled in and what not.

Cheers
Toni