Propagate TGA loader changes from robrowser repo

Based on roBrowser commit:
https://github.com/vthibault/roBrowser/commit/3cd48f394acd5094124fd92e6d8bd80930edd353
- Now 5% faster (tested on large TGA files).
- Clean up part of the code.
- Privatize unneeded public functions.
- Fix wrong colormap size.