Issue 10985 - Compiler doesn't attempt to inline non-templated functions from libraries (even having the full source)

http://d.puremagic.com/issues/show_bug.cgi?id=10985
This PR requires druntime fix: https://github.com/D-Programming-Language/druntime/pull/608

Today, implicitly generated code for assertions/array-bounds-check uses ModuleInfo object.
However `ModuleInfo` object won't be generated if the module is not in root - even though the code in module could be directly used by template instantiation and/or inlining.

To fix the issues:
1. Stop using ModuleInfo for assertion and array bounds check.
2. Relax the condition for inlining, due to fix bug 10985.

-----

During the work, I found a wrong-code [bug 11049](http://d.puremagic.com/issues/show_bug.cgi?id=11049), and this PR also fixes it.