loop_enter/leave hardening
This commit adds a counter for loop_enter/leave and checks:
- consecutive enter are used on the same thread
- leave is used on the same thread as enter
- at destruction, the thread_id and enter_count must be 0
This commit adds a counter for loop_enter/leave and checks: