Revert own previous commit rBe2f9afbaabbd.

The "Cast Shadows" worked as expected, but it can cause problem in some cases.
For example, when using strand render, we need disabling only buffer shadows,
but the previous changes made that impossible. "Cast Shadows" should be added
as a newly created option.
Transform: better logic to calculate manipulator normal orientation.

Use Z axis for the edge direction for edges and vertex pairs.

Issue raised in T38592, now edge select and vert-pairs share logic
for calculating orientation and the active vertex determines direction.
fix/workaround for v3d object mode selector flipping direction

Allow menu functions to define their own direction, this way
menu_item_enum_opname_menu can keep menu flipping from 2.69.
View3d: ensure locked views are on an axis - behavior wasn't well defined.
Cycles: Avoid unnecessary dot products in Mesh/Hair export code.
View3d: add utility function to get the quat from a view axis
View3d: fix for quadview box only syncing some view axis
View3d: enabling quadview box would copy view offset, sync to avoid jump
Fix/workarond for scenes rendered for sequencer preview

This is really a workaround which brings back direct display
list creation from drawing code. This is rather nasty to do
but proper solution would require some major sequencer redesign.
Freestyle: Fix for chaining operators not concatenating edges with Freestyle edge marks and at material boundaries.
Problem report by Postoman on the BlenderArtists.org Freestyle thread, thanks a lot!
Code cleanup: replace WM_OT_ndof_sensitivity_change -> WM_OT_context_scale_float

also increase maximum sensitivity
View3d Walk: enable rotation for ndof by default
NDOF: fix for negative colors and flickering hue when picking with HSVCUBE
NDOF: minor color picker improvements

- swap Z/Y axis so Z changes hue and X/Y change location.
  this way you can use ndof like a joystick and Z rotation like a dial
  for the hue.

- change sensitivity when shift is held to be 1/5th
NDOF/X11: fix for glitch using ndof outside the view and entering again
NDOF/X11: skip getting the time when no ndof events are processed
NDOF: print events when debugging is enabled
View3d: fix for ndof with quadview+box, missing sync.

also de-duplicate 3x pan-functions.
Code cleanup: ndof view3d operators use of ViewOpsData
Fix T38610: lattice U/V/W should not be animatable, is not supported.