Hero Points are interesting. However, reading the d20SRD, they are more akin to WFRP's Fortune Points. Quote the OP:
I don't mind what system it's imported from as long as it can support Pathfinder/d20
The integration/support of Fate Points from another system is a trivial house ruling IMHO, so I'm going to offer up Warhammer Fantasy Role Play, 2nd Edition Fortune and Fate Points as an option.
Without quoting the whole rule book on the matter, a Fate Point represents the PCs "cut above" and the gods marking them for greater things. Fortune Points are more akin to the d20SRD Hero Points (free actions, free re-rolls, &c.) and limited per game session. The Fortune Points per game session equal the number of Fate Points the PC has. If a Fate Point is spent, the number of Fortune Points available drop in the next session. Fate Points work as sought by the OP. Let's look at the RAW:
A Fate Point can be expended whenever a character is about to die in combat, through traps or accidents, as a result of poison or disease, or in any other circumstances. Instead of dying, the character expends a Fate Point and then the GM has to devise some way of ensuring that the character survives.
You may also allow players to use Fate Points to avoid being maimed. Many of the Critical Effects result in the loss of limbs, potentially crippling a favourite character. Using a Fate Point to avoid such debilitation is entirely appropriate.
How one GM's Fate Points is also covered:
When a character expends a Fate Point, it is up to the GM to come up with something that will prevent the character dying. No doubt the player in question will be full of helpful suggestions, but you should be careful to ensure that the character is not too much better off as a result of expending a Fate Point. The character should survive the situation, but that's it. It can sometimes be difficult to come up with a suitably tailored deus ex machina on the spur of the moment.
Once spent they are gone. But... GMs are encouraged to possibly allow Fate Points to be awarded for world saving events:
If a character succeeds in staving off a great menace, a Fate Point may be awarded along with the usual Experience Points. The menace must be significant and it must be apparent that, but for the character’s action, an appalling disaster would have taken place. Don’t let any fast-talking players convince you that wiping out a couple of dozen cultists is the same thing.
And Fate Points cannot be bought. Ever.
In WFRP, Fate Points are awarded from a random table at chargen based on race. This is not immediately applicable to Pathfinder, but some corollaries possibly exist. Humans are ascendant, demi-humans in decline. The number is never greater than 3 for humans, elves can never have more than 2.
The limited number of playable races in WFRP makes this a manageable list, but Pathfinder's list of playable races can make this difficult to manage. I might suggest that the number be determined on an average of the ability scores using a modified Table 1-3 from the Core rule book, possibly capping the upper limit at three (3), and the lower limit at one (1). Where zero (0) or a negative number is present, one (1) point. Allow three (3) only with an average of 17-18. This could be retconned to existing characters as well.
I blogged about using Fate and Fortune last year: http://bit.ly/fate-fortune