[WPT/common/security-features] Merge subresource path construction

This CL merges subresource path construction code in
referrer-policy and mixed-content tests into one.
This is mostly just merging common code, but with some changes:

- For the subresource paths in referrer-policy tests,
  cache_destroyer parameter is removed and instead
  action=purge&key=key&path=stashPath is added.
  Additional purging should be no-op, and the key (=guid) works
  as cache destroyer.
- New `originType` names are introduced (see `originMap` keys)
  and mapped from old names (see `originTypeConversion`),
  to use the common names among all tests.
  The old names will be removed entirely later.
- Mixed content tests are converted to promise_test() (previously
  async_test()), to make the test structures similar.

Moving the merged version of the common code to
/common/security-features/resources/common.js requires regenerating
of tests, because we have to rename common.js to common.sub.js.
Therefore in this CL the merged code is still placed under
referrer-policy and mixed-content tests.

Design doc:
https://docs.google.com/document/d/17VwvO8qGPjRpaki51L06I5dnefDhztMecaJ8k8qyRwU/edit#heading=h.9cf04xgaebha

Bug: 906850
Change-Id: I37e83a69954a5eb3b1a4be23f8ec4cc813299d95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562513
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650666}
4 files changed