Fix various path inflexibilities and inconsistencies

- MWVersion.php#getMediaWiki
  The other accesses to $_SERVER in this function have an
  error suppression on it, but this one did not. Messing with
  something locally from the command line threw an E_NOTICE
  on this one.

- multiversion/defines
  Simplify definitions by re-using the same variables instead
  of repeating the same paths. Makes it easier to update when
  testing locally in a different directory structure.

- multiversion/populateWikiversions
  Function populateWikiversionsCDB uses MULTIVER_CDB_DIR_HOME
  (on line 46) but multiversion/defines is not loaded. Not
  sure how this ever worked.

  Warning: file_put_contents(MULTIVER_CDB_DIR_HOME/wikiversions.dat):
  failed to open stream: No such file or directory
  in multiversion/populateWikiversions on line 45

- CommonSettings
  The on-demand loading of Profiler if CommonSettings is used
  outside MediaWiki context was broken since it has moved in
  core and now requires two files to get wfProfileIn and
  ProfileStub.

- Avoid making assumptions that php-X.X ($IP) is a direct
  subdirectory of common (e.g. "$IP/../all.dblist" etc.).
  Instead separating these concerns by having all MediaWiki
  inclusions use $IP, and all mediawiki-config / common
  references use $wmfCommonDir (set relatively based on where
  CommonSettings.php, which is in the same repository as
  all.dblist).

Change-Id: Ia723694e90af8d84182620043fba0563076fde81