Fix issues in imagemanager

XSS issue reported by Manuel Garcia Cardenas
Broken categories list
Some PSR-2 formatting cleanup
Some cleanup of session code

Use PHP management of session cookie when a custom session_name is specifed.  Remove function_exists checks for session_cache_expire since all supported PHP versions will have it.
Merge pull request #100 from geekwright/master

Fixes for session and imagemanger issues
Merge pull request #99 from alain91/master

fetch from XOOPS master and patch for class/themesetparser
Avatar cleanup

 - PM code now using avatar service.
 - Enhance gravatars module with preferences options.
 - Change max size defaults in avatars module to 128px to more easily use 128x128 icon libraries.
Merge pull request #101 from alain91/master

See comments of commits
Merge remote-tracking branch 'upstream/master'
PM avatar service conversion
Namespace issue in Logger and Dtype
Avatar service implementation
Changes as discussed in PR #101
Merge pull request #103 from geekwright/master

Cleanup related avatar service implementation
patches xoops_lib/Xoops
fetch from XOOPS project