Teach formulas about their id

This allows writing formulas that can adapt depending on what script
they're in.
Merge pull request #299 from plomino/jean-script_id-formulas

Teach formulas about their id