Simplify savepoint ID logic

A savepoint ID is now the "depth" of the savepoint.