Made State serializable

Closes https://github.com/PistonDevelopers/event/issues/223