Refs T13665
In the update to D21716 the `str_starts_with` function was used which is only available in PHP 8. This changes it to use `strpos()` which is compatible back to PHP 4.
Additionally fixed running into an error when trying to run `arc amend` on a commit which already matches the content known in Phabricator. Mercurial throws an error when running `amend` without file changes and using the exact same commit message it already has.