MergeFunctions: handle self recursive functions correctly.
First, it fixes a crash where the eliminated function is still referenced.
This shows up if two equivalent self-recursive functions are merged and those functions are internal.
Fixes SR-4514, rdar://problem/31479425
Second, it avoids creating a not needed parameter for really equivalent self recursive functions.