When is a person declared to be dead?
Although there exist some differing opinions mostly to do with brain function, the best answer is definitely the heartbeat. Here's why:

In some ways the human body really does operate like a machine. The process of delivering oxygenated blood is THE foremost example of a time-critical activity that must occur constantly in order to maintain life. That process stops when either breathing or pumping of the heart ceases, and since the circulation of the blood is more immediately critical than breathing it makes sense to place more weight on that criterion. 

Some medical conditions can lead to a person being essentially "Brain-dead" before they are biologically dead, but these situations are almost always extreme outliers to the general discussion of alive vs dead. Furthermore, the arguments surrounding that state too often and too easily cross over into philosophical/metaphysical commentary.

The only serious wrinkle to the argument above is hypothermia. This wrinkle is encapsulated quite nicely in the old medics' axiom "You're not dead until you're warm and dead." And it is well documented that hypothermic patients can sometimes be revived after long periods of time - in excess of a half hour - using special techniques and equipment (to prevent frostbite). 

Bottom line: Has the subject's heart been pumping any blood (including during CPR chest compressions) in the last 10 minutes? Is the subject hypothermic with a core temperature below 95 degrees Fahrenheit? Answers of "No." and "No." mean that the subject is no longer living.