Build Function Redux

What this does:
* Creates skeleton ``basic_build`` and ``basic_build_alt`` functions to reduce redundant code reusage
* Switch to unambiguous variable expansions throughout
* Use single-quotes for non-expanding strings
* Remove unneeded conditionals in all ``build`` functions
* Consolidates ``mednafen`` core building into one function
* Cleans up ``${RARCH_DIST_DIR}`` creation at the bottom of ``libretro-build-common.sh``
* Use bash string manipulation for core copying when possible

Things that can still be done to improve performance:
* Standardize upstream repos to use one name for a ``Makefile`` consistently (makes sense anyway)
* Update bSNES and bNES and mupen makefiles to follow the same clean and make practices as the other cores
   * this will allow for the use of ``basic_build``

As a final note, is there a reason that some cores build using ``${FORMAT_COMPILER_TARGET}`` and others use ``${FORMAT_COMPILER_TARGET_ALT}``? If there is no reason, then the ``basic_build_alt`` function could be removed which (though it would not really improve performance) would improve readability and code reusage.