Update joomla.php

Added onUserBeforeSave for dumping the user's groups and levels before the changes applied.
Changed onUserAfterSave for reading the previously dumped user groups and levels for comparison with the new state. In case it has changed, the user's session is loaded from the database and added a flag which will then be processed by the PlgSystemSession to updated the related user's session immediately and silently without the need to log out and in again.