feat(util/list): add remove_last template

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(library/elaborator): improve elaborator state data-structure

The "quota" hack used before this commit was inefficient, and too hackish.
This commit uses two lists of constraints: active and delayed.
The delayed constraints are only processed when there are no active constraints.
We use a simple index to quickly find which delayed constraints have assigned metavariables.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>

checkpoint

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(library/elaborator): improve elaborator state data-structure