Bugs 827969 & 827551 - gesture detector fixes r=lightsofapollo,cpeterson