What happens to a research group when a principal investigator (P.I.) dies? Is it common to have existing contingency plans? Principal investigators (P.I.s) are not immune to things like traffic accidents, fatal diseases, or acts of terrorism. 

Is it common to have contingency plans as to what will happen with funding, experiments, PhD supervision, and everything else that a P.I. is supposed to be responsible for? And if so, what do these plans look like?

[Full disclosure: I'm asking this because I personally have had a close encounter with death in the middle of a project I'm a co-P.I. of.]
No. The nice thing about most academic departments is that the bus factor is fairly high such that if an individual PI is incapacitated, there is generally enough slack in the system to compensate.

Most funding bodies allow for contingencies. They understand that things happen and that the funding often affects people other than the PI. In the case of the death of a PI, the funder would likely allow for a change in PI to take place. If there is not a single PI who has the required administrative and scientific experiences, co-PIs can be appointed (e.g., someone who has managed grants before and a post-doc who understands the research).

Experiments being run by PhD students, post docs, and RAs, would likely continue unchanged. Experiments being run directly by the PI would probably cease immediately unless there were ethical concerns (think a drug trial). In these cases there is probably someone else involved or a contingency plan in place.

Supervision of PhD students would likely be covered by someone else on the thesis committee.

Teaching and committee responsibilities would simply be reassigned. Immediate teaching duties will often be given to a post doc or graduate student.