Add support for HW Rotation Lock

Forward ported from jellybean

Change-Id: I75fb9fa33541eb6acedd62a67e74977b36768390

original commit by Brian Floersch