Reordered event hierarchy of onEndRequest handlers so that settings "save" fires first

 - More efficient user table install test
 - Modified NSettings to encode to json rather than php serialization
 - Added NDbCacheAuthManager as it caches complex auth queries saving lots of db calls
Merge branch 'master' of git://github.com/newicon/nii-core