continue: added support for graft
This adds support of graft to hg continue plan.
The patch creates a seperate function cmdutil.continuegraft
so that continue logic for graft can be called independently.
This logic is registered to the statedetection API as continuefunc.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6655