Residency is a bit of a moving target and depends for what reason a person is trying to maintain residency. Most people head off travelling and pop back home at least once if they are gone as long as you are planning for.
I would guess that as long as you keep a mailing address, keep paying your monthly premiums and start off your trip as a three month journey that happens to get extended a few times, then at least you have a plausible argument to maintain your residency in ON for at least medical coverage. I cant speak for Ontario, but in B.C. since it's universal healthcare as well, they are more concerned about collecting premiums as small as they are and less if you have been filtering in and out of the province. If it were full on private insurance, I would guess the rules are a lot more rigid.