It seems that we missed the backward compatibility support
for profiles in the existing folder.
This commit also fixes some specs to be idempotent
and work in a temporary directory which not always
seems to be the case.
This commit also brings the profile_spec.rb which seems
to be missing.
Extend the support for "X-Profile-Token: <token>" to have an additional
header that defines type of profile we are looking for, like:
X-Profile-Mode: execution
X-Profile-Mode: memory
By default in Rails 5, content passed to `render` will be
escaped. This doesn't work for the HTML profile output, which
should be considered safe HTML already.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56152