Implements state-override without engine.js

The engine.js implementation was more difficult to extend
than to simply implement it myself from scratch.

A nice sideeffect is that it's now much faster.

The state-override feature is now turned on by default.