In my case I cannot resign after reaching Canada. The thing is I recently took a long leave due to health reason. My HR and bosses were not very good with it. So if I took a big leave again than it would be as good as being terminated.
By early resignation I can get my PF and gratuity as I worked in same company for more than 7 years.
Though after getting passport seems good option, resigning after landing is out of question for me at least.
Resigning after landing is anyways is not an option (atleast not for Indian applicants). As rightly pointed out by you, you would want to withdraw your PF & Gratuity so that atleast you can use the money when required. Also you would want your experience letters & all.
A logical ending to your current job is very important, so that no liabilities build up in your absence.
Time of resignation would also depend upon how well prepared are you to leave after receipt of your Visa. Some people take less then 1 month, some take even upto 6 months before they can actually leave.
If you can manage without your job for few months (financially), then I would suggest resign after 1 month of submitting your Passports. That much time would be sufficient for knowing if their is any objection in medicals or otherwise. If not, then continue till you receive your Visa. But remember it takes 60 days before you can apply for PF withdrawal from the date of relieving & thereafter 2-3 months for the money to come into your account.
People have varied opinion on the timing, but frankly it depends upon your specific personal situation.