mysql: replace all "cast(foo as integer)" to "cast(foo as signed integer)" and not just the first one
Merge pull request #4331 from Montellese/mysql_integer_cast_fix

mysql: replace all "cast(foo as integer)" to "cast(foo as signed integer)" and not just the first one
Optimized CApplication::CheckShutdown() not to do further checks for timer reset conditions once resetTimer is true.