fix Issue 10976 - thread_joinAll after main exit performed too late

- Move thread_joinAll out of rt_term and call it
  immediately after exiting from main instead.
- Make it an error to call rt_term when other non-daemon
  threads are still running.
- It was not a good idea to call thread_joinAll in rt_term
  because with DLLs threads could have been attached and
  outlive the runtime.
- As a side effect it will be called before `static ~this()`
  of the main thread is run.
Add _d_arraybounds(string, uint) function

Not taking ModuleInfo is important to reduce dependency on runtime.
Merge pull request #608 from 9rnsr/fix10985

Add _d_arraybounds(string, uint) function
Merge pull request #600 from dawgfoto/fix10976

fix Issue 10976 - thread_joinAll after main exit performed too late
use DMD env variable for runbench.d if set
Merge pull request #610 from dawgfoto/runbenchDMD

use DMD env variable for runbench.d if set