Fix T38325: Game Engine Bitmap fonts failed for characters >128
BGE Bitmap Text: add in check if the character is outside the range
Fix T38110: GameEngine keyboard sensor ignores unicode characters
Fix T38328: GLSL display shows texture mapping completely messed up in some cases

Own stupid typo in rB28ca299d4dfc...
WM: add WM_operatortype_remove_ptr to remove a known operator
Fix T38042: Keymap crash after reloading operators

After some investigation with mont29, seems like the best way to ensure
keymaps point to valid operators is using WM_keyconfig_update().
Removed the omat matrix from DupliObject.

This was storing the original object matrix, which builds on the
assumption that obmat is modified during dupli construction, which is a
bad hack.

Now the obmats are still modified, but this only happens outside of the
dupli system itself and the original ("omat") is stored as local
variables in the same place where the obmat manipulation takes place.
This is easier to follow and avoids hidden hacks as much as possible.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D254
Fix T38284: Crash with several shrinkwrap constraint using same target

Issue is caused by the race condition between getting custom data layers
from target's derived mesh (for vertices and faces) and releasing this
derived mesh from other threads.

When one releases the derived mesh it'll free temporary data from it,
and it'll also update data layers mapping.

General rule for threading is that no one is ever allowed to modify
data he doesn't own. This means that no temp layers are to be allocated
in derived mesh and making it so `CustomData_free_temporary()` doesn't
update mapping if nothing was freed will solve the race condition.

It is still possible to do other improvements, namely detect which
additional data/layers are to be present in derived mesh and create
it as a part of `object_handle_update()`, but this is to be solved
separately.
Fix for IMB_(un)premultiply_rect_float() not doing right business

- Made them receive number of channels rather than number of planes.
  This matches to how ImBuf structure stored planes and channels.
- IMB_premultiply_rect_float() was called with channels passed instead
  of planes already :S.
Fix typo in mmap commit from a while ago
Code Cleanup: find operator once and reuse
Code Cleanup: whitespace
Fix for crash getting the name of RNA properties with empty name
Fix crash when changing space type to 3D space when having multiple windows

it is possible that different windows shares scene but displays different
layers. And it's also possible that different areas in the same window will
show different layers.

First case was violated in `dag_current_scene_layers()` which only checked
scene layers only once and if multiple windows shares the same scene only
one window was handled. Now made it so layers from all windows will be
squashed together into a single `DagSceneLayer`. This mainly solves issue
with `DAG_on_visible_update()` which didn't work reliable with multiple
open windows.

Second case required call of `DAG_on_visible_update()` when changing space
are type.

This commit slows things a bit actually because `dag_current_scene_layers()`
is actually called on every main WM loop iteration. It is possible to speed
some logic up perhaps. Not sure it's so much critical to do now because there
are unlikely to be more than few windows open anyway.

Will rather think of skipping all that flushing things if no objects are
tagged for update actually.
Cleanup: int/short to bool in BKE_cdderivedmesh.h functions (and TRUE/FALSE to true/false in code using them).
Fix T37685: automatic weights affected by face masking outside weight paint mode.

Only when in weight paint mode should it check the selected vertices and faces,
in object mode it should just affect the entire mesh.
Fix T37302: cycles slow hair export with many hairs, especially on Windows.
Fix T36165: blender internal HDR textures with negative values got clamped.

For example for vector displacement, you may have an EXR texture that has
negative colors values. Blender clamps these by default, now the Colors panel
for textures has a Clamp option to disable this clamping.

This option affects all texture types and is enabled by default, you need
to disable it if you want negative values to have an influence.

Patch by Fredrik Hansson with modifications by me.
Fix T38337: Crash when calling to_mesh() on a Curve object after clearing its parent

This is rather a workaround which only works because curve evaluation is only called
for a temporary object. Not a big deal if we'll skip path creation for such objects.

Still would need to think of general solution.
Make Tab Divider interopolate between the region background and tab outline.

Previously the divider was using the region background and the region text, leading to bad outlines with custom themes. This makes the outline behave more expectedly and allows better control.