sensorservice: Add legacy sensors fusion.

This change allows devices with accelerometer & magnetometer but
without gyroscope to still get virtual sensors such as Gravity,
Linear Acceleration and Rotation Vector.

Ported from: http://review.cyanogenmod.org/#/c/31329/

Change-Id: Ifa702cb0383ea1fd84511539fb67ec69ce9a558a