Checkpoint commit for gyro sample

I am preparing the code for integration of a Kalman filter. This
prep includes:
* Adding in a compass visual so that both 3D orientation and tilt
  compensated 2D compass heading performance can be evaluated at the
  same time.
* I needed to convert the 3D rotation calculated from the
  accelerometers and magentometers to a quaternion of similar format to
  that used for the existing gyro sample.  This version of the code
  discards the gyro rotation results and just uses the accel/mag based
  quaternion. An upcoming commit will merge the two via Kalman filter.
Add quaternion stat gathering

I added some code which calculates the statistics (mean and variance)
for the quaternions created by the gyro and the accelerometer/
magnetometer combination.  These measurements should serve as a good
starting point for the Kalman Filter covariance matrices.
Don't use filtered sensor data

I was incorrectly using the accel/mag data from the moving average
filter.  It should be unfiltered in-preparation for use by the Kalman
filter which will perform the actual filtering.
Refactor gyro sample

I was mostly just cleaning up the code and making it possible for the
user to select the use of either the gyro only based rotation as the
source or use the accelerometer/magnetometer combination.  You can
now press the following keys to select the orientation source:
'A' for accelerometer/magnetometer
'G' for gyro only
'K' for future Kalman Filter approach