Add lifetime interval calculation.

This is used in the interpreter to do stack-slot allocation.

Change-Id: I9f4df8fdca35889f4b1154dbbe7d68b579886e18
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>