A pigeon suspected of being a Chinese spy has been cleared of all charges and released back into the wild.