Fixed Texture2D.GetData on DirectX platforms

Fixes #2348
Added support for the element count parameter
Added option to read the stream quickly if row pitch matches row size.

The previous implementation was wrong because the output type was mistaken for the input type and the incorrect size was used when reading (1 for byte vs 4 for color).