archive*.bbclass: Fix removing SRC_URI entries from WORKDIR

:Release Notes:
Imported from oe-core aa02769727203650bfebf38082a2dadcc7e3b443
with changes from this e-mail:
http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087729.html

:Detailed Notes:
* archiver can sometimes overwrite or remove some files which are
  needed by other tasks.

  This happens in cases where file referenced in SRC_URI aren't
  unpacked and are used by other tasks directly from WORKDIR

  def archive_sources(d, stage_name): downloads sources from
  SRC_URI again to WORKDIR in order to create source tarball from them
  (normally it's ok, because source tarball is directly unpacked from
  DL_DIR so never stays in WORKDIR).

  def archive_sources_patches(d, stage_name): then creates the tarball
  itself and moves source and patch tarballs to deploy with:
  move_tarball_deploy(d, [source_tar_name, patch_tar_name])

  But in cases where source_tar_name == "required" file we're using:
    1) do_unpack downloads "required" from DL_DIR to WORKDIR,
    2) archive_sources overwrites it with another copy,
    3) archive_sources_patches removes it,
    4) do_deploy fails because it wants to install now non-existent
       ${WORKDIR}/required

* move duplicated ARCHIVE_SSTATE_* assignments from archive-*.bbclass
  to common archiver.bbclass
* introduce separate workdir for archiver ARCHIVE_SSTATE_WORKDIR and
  move ARCHIVE_SSTATE_SCRIPTS_LOGS_INDIR,
  ARCHIVE_SSTATE_DIFFGZ_ENVDATA_INDIR into it
* change archiver.bbclass to dump scripts-logs and diffgs-envdata into
  right directory (respect variables defined above instead of hardcoding
  the paths in code).
* use d.getVar* API
* unify workdir/work_dir usage for ${WORKDIR} and use separate variable
  archiver_workdir when it means ARCHIVE_SSTATE_WORKDIR

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[GF-60602] Distribute source code to comply with the open source
           obligation

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Ifbd868fcf4c5de667f9ac5a000373ce0a7783380
Reviewed-on: https://g2g.palm.com/4241
Reviewed-by: DCO Verification
Reviewed-by: Martin Jansa <Martin.Jansa@lge.com>
Tested-by: Martin Jansa <Martin.Jansa@lge.com>
Reviewed-by: Susan Montooth <susan.montooth@lge.com>