Split Texture2D on a per-API basis

Another API file split as in #2243, this time applied to Texture2D. As always, additional sets of eyes are appreciated. These involve a lot of tedium and #ifdef juggling, so I'm bound to make mistakes eventually.