Fixes #4837
Fixes #4119
Fixes #3330
Issue #2372
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082