Declaration::isResult now always returns 0

(storage_class & STCxxx) may overflow if STCxxx is bigger than int.max
fix Issue 9413 - Incorrect modification inside contracts is not detected correctly
fix Issue 9414 - Incorrect modification inside contracts is not detected on virtual function
Fix up error messages for 9414
fix Issue 9788 - -profile doesn't work if exceptions are thrown in the running program
Merge pull request #1806 from WalterBright/fix9788

fix Issue 9788 - -profile doesn't work if exceptions are thrown in the r...
make use of Statement::apply()
detab on runnable/testenum.d
fix Issue 9845 - enum value should be able to contain forward references in global scope
fix Issue 9846 - regression of forward references
fix Issue 7719 - enum forward reference error when enum is in braces
fix Issue 9720 - OSX wrong code with -O Illegal instruction
fix Issue 9775 - Can no longer create a const Date in CTFE if the variable is explicitly typed
fix Issue 9806 - assertion failure in struct.c:668

- Save Scope object to resolve forward references
- Do constant folding in template value argument comparison

Additional:
Add assertions to check AST identity in `ClassDeclaration::semantic` and `InterfaceDeclaration::semantic`.
Improve 'is used as a type' template error

If a template instantiation fails, a spurious 'XXX is used as a type' error
is generated. Suppress it.
Also, when a constraint fails, change the instantiation error into a
supplemental error message.
fix Issue 9863 - Incorrect generation of SAHF instruction on 64 bits
Merge pull request #1822 from 9rnsr/fix9806

[REG2.063a] Issue 9806 - assertion failure in struct.c:668
clarify as suggested in pull #1813
Merge pull request #1820 from WalterBright/refactorApply

make use of Statement::apply()
Merge pull request #1827 from WalterBright/fix9863

fix Issue 9863 - Incorrect generation of SAHF instruction on 64 bits