A murder suspect has been cleared of allegations that he killed a man by attacking him with a sword in Greenock.