Update device.js from matthehudson and also fix for better orientation d...

This branch have updates from matthehudson's device.js and also fix for a better orientation detection.

Problem 1: Some Androids are slow in updating the windows.innerWidth

Solution: We poll for the change.

Reference: https://github.com/mobify/mobifyjs/blob/v1.1/api/orientation.js


Problem 2: On shorter phones, when you have keyboard open and url bar visible and tries to change orientation, in some cases, you will have a landscape sized window while in portrait.

Solution: Reduce the comparing ratio to 0.8.

The largest available screen ratio on smartphones or tablets is 4:3. I set 0.8 as the comparing ratio for some buffer room.


Problem 3: Sometimes, after orientation change, certain browser sometimes failed to render certain css properties. This often involves with overflow elements.

Solution: Add a new class that will exist only during orientation change.

We can use this orientationChanging class to reflow elements that failed.

Reviewer: @scalvert @donnielrt @tedtate @MikeKlemarewski 
We should probably name this "orientation-changing"