"the only possible evidence they had was the wrong username."
Out of curiosity and definitely not defending this prosecution, but if the chain "unique Kik username -> unique gmail address -> unique ISP user -> guy living alone, happens to have Kik on his device" weren't screwed up by the investigators submitting the wrong username, would you say that's enough for a jury to convict ? I don't know about Canada but in the US at least no judge would step in and say that's not enough for a jury to convict on. Convictions happen based on he said/she said. In fact that's probably what this boiled down to. The defense isn't hiring a computer expert to dispute the chain "validated" by Kik/google/etc. unless the guy is rich. They probably accepted that as fact and just argued it wasn't him using the account. And everyone charged with this type of crime says "It must have been someone else on my computer."
No, there are open wifi routers, there are WPA attacks, friends that were given wifi passwords, and a lot of other things. Convicting on IP address match should disqualify the trial judge.