shelve: don't delete "." when rebase is a no-op (issue4398)

When unshelving and facing a conflict, if we resolve all conflicts in
favour of the committed changes instead of the shelved changes, then
the ensuing implicit rebase is a no-op. That is, there is nothing to
rebase. In this case, there are no extra intermediate shelve commits
to strip either. Prior to this change, the commit being unshelved to
would be marked for destruction in a rather catastrophic way.

The relevant part of the test case failed as follows:

    $ hg unshelve -c
    unshelve of 'default' complete
    $ hg diff
    warning: ignoring unknown working parent 33f7f61e6c5e!
    diff --git a/a/a b/a/a
    new file mode 100644
    --- /dev/null
           b/a/a
    @@ -0,0   1,3 @@
      a
      c
      x
    $ hg status
    warning: ignoring unknown working parent 33f7f61e6c5e!
    M a/a
    ? a/a.orig
    ? foo/foo
    $ hg summary
    warning: ignoring unknown working parent 33f7f61e6c5e!
    parent: -1:000000000000  (no revision checked out)
    branch: default
    commit: 1 modified, 2 unknown (new branch head)
    update: 4 new changesets (update)

With this change, this test case now passes.

--HG--
branch : stable
extra : rebase_source : cd2ad830db14030ca23538cde2f5846061d636d2
extra : amend_source : 7f3ad5a773a527bc2c91d4c69fe3c26b1574e1e2
templater: fix ifcontains when list is a string (issue4399)

--HG--
branch : stable
extra : rebase_source : 34ffa59204d540903d65643b91993e9ac438a61f