When arriving in Toronto, follow the signs for "Domestic connections" and show your onward boarding passes to YHZ to the agents.
Thanks to the new one-stop-security proceedures, you can clear Canadian immigration in a special area which then spits you out directly into the D gates, i.e. Canadian domestic departures. Once there, you can go to the Priority Pass lounge (Plaza Premium) or the AC lounge and use their facilities.
Then, simply leave the domestic airside zone as any arriving domestic passenger would and enjoy your day around Toronto.
Note: This only works if you have no checked bags or they are checked right through to YHZ.