fix calculation of average session memory

WOStats page did show wrong or even negative numbers
better naming of method
track thread names for warn traces
minor fixes
added index creation for MicrosoftSQL
Merge branch 'master' of ssh://cthullu.selbstdenker.com:7999/WO/wonder into index_for_mssql
Merge pull request #530 from jburzler/index_for_mssql

Index for mssql
Merge pull request #508 from darkv/statistics_patch

Wrong session memory on statistics page