Fix T38190: Linux tablet: Issue with XInput/GHOST?

With edits by Campbell, thanks!

Looks like in some cases (driver dependent?), `XDeviceMotionEvent` get generated with only part of expected data
(e.g. only x coordinate, only pressure, etc.), data which did not change since last event being NULL.
We know which data to actually handle with `XDeviceMotionEvent.first_axis` and `XDeviceMotionEvent.axes_count` values.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D208
Color control for bl_debug_draw functions
Fix T38171: Vertical tabs don't respond to clicks on the left most pixels
Code Cleanup: replace checks for ima->source with BKE_image_is_animated
Ceres: more warnings cleanup
Code cleanup / Cycles: Don't pass scale to texture functions, do the multiplication in the function call already.
Cycles: Fix Wave texture difference between OSL and SVM, OSL wasn't using the "Scale" properly for distortion.
Empties with Images draw type: add support for movies and image sequences

This adds an ImageUser to such empties with all the typical settings.

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D108
Fix T38176: can't set vertex coordinate to 0.0 when it's set to 0.0000001.
Fix T38192: OSL got incorrectly enabled in preview render when GPU was selected
for rendering of the main scene.
Math Lib: minor optimization for angle functions
Fix T38186: mesh inset didn't follow edge directions for flat surfaces

also improve evenness when the inset direction wasn't exactly between both edges,
Make Toolbar Tabs more readable

This makes the tabs slightly larger, increases the text size slightly, and adjusts the colors a bit to improve overall contrast. It also makes inactive tabs draw with a full tab shape, improving the readability at a glance, particularly when tabs are very small.

The users most affected will be those on smaller displays, where previously tabs were very difficult to read.

Reviewers: @billrey, @campbellbarton

Differential Revision: https://developer.blender.org/D170
Missed a comment on last commit.

This was missed in the previous commit. Adding back for future readability. Thanks @campbellbarton for spotting it.
Code Cleanup: minor edits to recent commit
Correct bad mistake in own recent to commit to angle calculation
Fix T38205, typo in Add Torus operator.
Add check for KD tree size to BLI_kdtree_insert()

Makes sure we're not trying to insert more nodes than we've
been expecting to.
Fix T38196: Crash with smoke simulation

Issue was caused by KD tree being allocated with the wrong size.
Fix for own regression, editmode object selection (Ctrl+RMB)

Wasn't working because of editmode override (which uses regular object selection in editmode)