release stage: Do not leave garbage in the tree

In case of CircleCI integration, release stage was using only git reset
--soft, which could lead to leaving garbage in the working directory.

The code was changes to first check if the repository is clean, and if
that is the case, reset --hard is used instead.
Finished feature 73618758/stage-leaves-changes-in-wd.