Fix HInstruction::ReplaceInput(), allow no-op.

Allow HInstruction::ReplaceInput() to be called with
a `replacement` being the same as the old input and
do nothing in that case.

This is a follow-up to
    https://android-review.googlesource.com/216923
where I erroneously assumed that it never happens.

Also adhere to the standard C++ std::forward_list<>
semantics in the single-element overload of
`IntrusiveForwardList<>::splice_after()`.

Bug: 28173563

(cherry picked from commit c6b5627c25ff5653e97ccff8c5ccf6ac967b6f83)

Change-Id: I66b7d4b48f629284d0bcb1d31100519e02a872e5
4 files changed