OSX: as an prerequisite to make Dalai's upcoming "area_fullsceen" work,
make sure the window states are correct in the lion_fs animation phase.
This also assures the CTX_wm_window(C) is okay.
Cycles: Use a bit better approach for erfinv()

Also reduce number of branching and multiplications a bit by inlining the branches.

This gives an unmeasurable speedup, which is in case of BMW is about 2% here.
Fix T42163: Outliner: recursive visibility toggle: autokeyframe only works for ancestor, not children

Ancestor's autokeyframing is handled through UI/buttons code, but children completely
skipped this, so we have to do it explicitely here...
Fix typo breaking compilation with rather strict flags (does not like implicit double to float conversion).
Code cleanup: tabs vs. spaces (tm) commit
Change interaction of pie menus slightly.

In drag style pie menus clicking is ignored now. This is done because
if we want to ensure that pie menus will not respawn, we had to not
destroy and keep the pie menu invisble while the button is pressed.

This opened a can of worms where pie items that would spawn popups could
steal the focus from the invisible pies and then the former pies would
be stuck in an invisible state, stealing all input unless user did a
right click to cancel the pie.

Invisible state is still kept for cancelling and strictly for that only.

This still allows nested layouts but only in click style, while hold
style is used for faster interaction. As a plus, it should also be
possible to tweak slider properties now, though menu will close after
that.
Code cleanup: Fix silly duplication of typecheck and swap macro
Fix T41950: Parent-Child Menu behaves weird

Issue was, parenting with operator, then unparenting would keep the inverse parent matrix.
So if you then parented again through the mere Object field of Object buttons, you'd still
use previous inver parent matrix, giving some weird behavior from user PoV.

This commit simply makes sure inverse parent matrix is always reset to indentity when clearing
parents.
Cleanup (no functional changes):

* int -> bool where possible
* Use const where possible
* Get rid of magic numbers
* Add/tweak a few UI tips
* A few other misc changes.
Cleanup: tabs in empty lines.
check for missing Windows error code headers (was missing from Mingw64)
fixed printf format warning that occurred with 64-bit targets
Cycles: set hit values in-order
Cleanup
Fix another crash with Navigation mesh.

Navigation mesh object need to access the current scene at
creation time. This can be at scene start or when an object
is instantiated from an inactive layer. The method of getting
the scene differs in these cases. This fix handles both.
very stupid cut tool
test
test2
Split out functons
fix since merge