added no_screenshot to ndof ops, and added last_screenshot to view3d rot/zoom
Replace the int argument for user count mode when restoring pointers on
undo with a nicer enum.

This is more transparent about what happens with the user count.
Also added comments to make certain the meaning of these values is
easily understandable.
Fix T38407: Bone roll calculation flips local axes at wrong rotation angle.

Basic idea is now to have the transformes bones keep "facing" the armature's Z axis, see comments in code for details.

That might not be ideal, but at least we now have humanly predictable and consistent results.
Fix T38743: Modal input feature appears to be missing from 2.70 test builds

Add 'pad *' in addition to '=' to toggle basic/advanced numinput modes.
Minor UI messages fixes.
Avoid UUOC in install_deps.sh

The file ##build_files/build_environment/install_deps.sh## contains the following line:

  THREADS=`cat /proc/cpuinfo | grep processor | wc -l`

The command within the backticks is a [[ http://catb.org/jargon/html/U/UUOC.html | Useless Use Of Cat ]].

A more compact way of writing the same thing (saving two subprocesses) is

  THREADS=`grep -c processor /proc/cpuinfo`

or (using POSIX-preferred command-substitution parentheses instead of backticks)

  THREADS=$(grep -c processor /proc/cpuinfo)

But the most compact, and least Linux-specific, way is to use the ##nproc##(1) command from the [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | GNU coreutils package ]]:

  THREADS=$(nproc)

Reviewers: sergey, mont29

Reviewed by: mont29

Differential Revision: https://developer.blender.org/D255
Followup for numinput: activate numinput when hitting pad* or =, this is the expected behavior from users!
Fix T38645 - Mouse reversed in standalone player with kde

Reviewers: moguri

Differential Revision: https://developer.blender.org/D344
Code cleanup: use lowercase names for vars
MSVC: resolve utf8 encoding issue with some codepages
Fix T38769: Python missing access to text materials
T38763 Fix: avoid NPE When no custom properties are defined
Fix an uncaught exception on OSX, perhaps general with popups
Partial fix for T3817: BGE crashing when using LibNew.

The BGE needs to use BKE_main_new() isntead of calloc for
allocating a Main struct since the threaded depsgraph changes.
OSX/scons: Fix language menu not showing up in prefs:
The languages file was not installed to locale due it has
no extension, using ditto now
NDOF: fix for use with locked offset

- when locked to cursor or object. fallback to orbit and allow zoom.
- correct speed calculation in perspective mode.
NDOF: Auto-Depth preference was used while orbiting
NDOF: various fixes for view3d

- allow zooming when in ortho+user mode
- fix for using VIEW3D_OT_ndof_orbit_zoom when the camera is locked.
- fix for locked camera changing the dist value when used with ndof.
- de-duplicate ndof_pan_zoom and ndof_all operators
Fix for recent changes with NDOF
Fix T38786: Curve unable to make segment