Update to 2.4.10 and latest changes from main.

2.4.10 includes the BOW changes this was originally for, making the patch moot. This also fixes CUDA compilation.