[ipc] fix share state bug introduced by commit 6814244380

FcitxInstanceSetICStateFromSameApplication uses prgname before
it is set correct. Need to set prgname before that.