prefix state, previousState and nextState with $

Previously these were prefixed with an underscore and it created
confusion, as the other reserved properties were prefixed with $. Also
the underscore is used in Models to indicate client-side fields.