Add general tail call elimination. Fixes #77.