add ScopedTextureBind overloads to work around vs2013 bug

Also:

* inlined gl class forward declarationg from gl.h, they aren't used in that header, and couldn't be made use of anyway without the shared_ptr versions
* removed typecasts in samples that were necessary before the `ScopedTextureBind()` overloads are added.