Clean up state after test too

Because content is not serializable by upper layers.
Merge pull request #232 from digawp/datastore

Clean up state after test too
Changed iterator

Conflicts:
	You-GUI/task_panel_manager.cpp
Set to element before end
Changed to another method.
Removed unnecessary include.
Changed dependency insertion again
Fixed some include stuff
Syntactical change
Fixed compile issue
Tiny fix for #220