Add initial support for autorotation in tablet mode

Based on C code in https://github.com/pfps/yoga-laptop (sensors)