[stubs] Refactor StringCompareStub and use it for HStringCompareAndBranch.