added support for configuring custom states.

you can now define an attribute called "class" on state nodes, within
the state machine xml markup.
the xml builder will then create the correct state implementations.
if you want to control the creation of define custom state by yourself,
you should extend the xml builder and override the "createState" method.

refs #1