Resolve CID 1037098
Fix potential buffer overrun
Move declarations closer to where they're first used
Reimplemented version.h:
- Use macros to form version number and string. CPPCHECK_MAJOR, CPPCHECK_MINOR and CPPCHECK_DEVMINOR now contain the parts of the version number.
- "dev" status is now detected by comparison of CPPCHECK_MINOR and CPPCHECK_DEVMINOR, version string created accordingly.

Fixed two comments.
Merge pull request #411 from Dmitry-Me/moveDeclarationsCloserToWhereTheyreNeeded

Move declarations closer to where they're first used
Several fixes to invalidScanfFormatWidthError():
- Different IDs for different messages (#5809)
- severity is warning, not style, so check _settings->isEnabled() properly
- Removed never shown message text
Fixed reporting of unmatched suppressions for unusedFunction (#4946)
Bailout for duplicateBranch check if branches are empty (#5354)
Move cheap checks earlier to avoid more expensive ones
Fixed unreachableCode message if a lambda is returned (#6008).
Run unreachableCode checking only on executable scopes (#5789)
Fixed crash on garbage code introduced by recent commit.
Refactorization in checkmemoryleak.cpp:
- Use Library to detect noreturn/notnoreturn functions
- Removed realloc from std.cfg as long as there is no proper way to configure such functions
Attempt to fix crashs when self-checking cppcheck introduced by previous commit
Improve C style casts detection
Merge pull request #412 from Dmitry-Me/moveChecksEarlier

Move cheap checks earlier to avoid more expensive ones
Disabled several checks and simplifications for C code, if they are C++-only. Do not match arguments for C code, since there can't be overloads.
 #5805 'Passing value -1.0 to sqrt() leads to undefined result' is incorrect. Degrade wrongmathcall from error to warning, since it deals with implementation-defined behaviour
#6116 False positive uninitvar - first argument to wcstombs(). Correct stf.cfg
Handle ternary operator in redundantAssignment check (#5964)