Don't hand in notice until the visa is through. If it is approved, well, you have a contractual obligation to work your notice, so do so. The Home Office are not going to (in my opinion) have a problem with this even if you do not technically have a visa to cover the notice period.
Vicky