JUser replaced with User

Logout was broken. I replaced Joomla's deprecated JUser with Cobalt's User model together with this fix.

Some other fixes flows. 

Important: Mysql handler was replaced with Mysqli, because there is a bug at Mysql handler, updateObject method which causes infinite loop and server restart is necessary. Change it at your configuration.php to prevent this infinite loop.