Follow-up to, for a customizable core folder location suggested by several people on that issue, for instance chx (comment #126):
"(...) another constant -- it would worth it! Put the constants in constants.php and include it always that saves you the work of defining of it N times. And then aspiring people can put their Drupal where they please. Like, outside of the document root. Put the php files being used in docroot (just index.php in production, most of the time) edit constants.php and have fun. The point, of course, is somewhat heightened security."
A possible way, new constants DRUPAL_CORE and DRUPAL_SITES, with default but potentially customizable locations, mentioned by kbahey (comment #79):
"Perhaps we need DRUPAL_ROOT to stay the same, then DRUPAL_CORE is really DRUPAL_ROOT . '/core' and DRUPAL_SITES is DRUPAL_ROOT . '/sites'. Those can be the first 2 lines in bootstrap.inc (and friends, such as install.php ...)"
Fixing #22336, which creates an integrated Drupal core folder, would be the first step before this follow-up issue to customize the core folder location inside/outside the web root.