Made Texture more C++/RAII-ish, thus removing the need for a bunch of
manual new's and delete's. Also switched to C++11.