better Compass class

this compass class allows for and external listener and replaced the deprecated sensor used in the old class.
it's also backwards compatible with the old Compass class so, it should work with the rest of the code