feat(lua/expr): add method for extracting semantic attachment data

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(util/interval): add more tests

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