This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
When texture painting a lot of time is spent in ED_image_paint_tile_find.
This fixes stores the PaintTiles in a blender::Map making ED_image_paint_tile_find an O(1) rather than O(n) operation.
When using threading the locking should happen during read as well,
still this gives a boost in performance as the read is now much faster.
Reviewed By: jbakker
Maniphest Tasks: T99546
Differential Revision: https://developer.blender.org/D15415