Added check when setting either session on a jsoninstance or setting json as data on a session so that only root-objects that have no parent can be used.
Added unittests for Sessions and single application state and only allowing rootobjects as state.
Fixed a few bugs when handling sessiondata for multiple applications.
Added unittest for multiple applications sharing session.