Make ActiveRecordModel.(not_)in_state work with initial states (BREAKING CHANGE)

Annoyingly this means all implementations of  `ActiveRecordModel` need to add a `state_machine_class` class method, so that initial state can be detected.

@greysteil could you take an initial sanity-check? The SQL is getting pretty skanky now.
I'll investigate...