Flatten data-config and data-userstate

* re-trigger setAttributes and setLearnerState events, without modifying attributes;
* flatten attributes, don't use data-config and data-userstate. Just pass in all data-attributes;