Create a dummy console for browsers without one

Fixes issue with IE8 under Win7
Bug fix & trivial performance

Fixed deep history propigation bug.
replaced != with !=== and == with === in a few places.