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.
Sculpt: update dystopia debug verify
Minor alignment for triangles on number slider widget
Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL.
Bugfix: "Hide" button in modifiers panel did only hide smoke domain, not the smoke.

Reported by nudelZ
Cycles: Add CUDA support for sm_32 (Tegra K1, Jetson TK1).

Fix T42174.
Minor typo fix, reported by Sebastian Koenig on irc. Thanks!
Mesh calc smooth group: several fixes.

* Consider non-manifold edges as sharp, as in split normals handling.
* Consider edges from sharp polys as sharp!!!
* Fix returned number of groups (was off-by-one for non-bitflags grouping, could also
  be wrong in case of id overflow).

Note about using sharp polys too to define groups: Only current use of this function
(Obj exporter) does not need that, because it does its own check for sharp faces.
However, we might reuse that func in other places in future (e.g. in custom split
normals area), so better to get a consistent behavior!
Pie menus: Confirm threshold

This commit adds a confirm threshold property to pie menus.

Basically, this will confirm the pie menu automatically when
the distance from the center of the pie exceeds that threshold without
a need to release the pie button.

The confirm threshold will only work if it is larger than the pie
threshold.

The confirmation actually occur when the mouse stops moving, to
allow multiple pie menus to be better linked together, (see below)

This functionality also facilitates the ability for chained pie menus by
dragging. Basically, a pie menu item can be a call_menu_pie operator and
the new pie menu will still use the original pie menu release event for
confirmation. This should allow for quick, gesture based navigation in
pie menu hierarchies (going back in the hierarchy is still not supported
though)

There will be a demonstration pie in the official add-on soon
Fix embarrassing typo...