Added note about KeepAfterUse to pre-re item_db

- Follow-up to d4e0689
- Special thanks to Litro
- Also synchronized header comment of the item_db2

Signed-off-by: Haru <haru@dotalux.com>
Allowed flag values of map_count_oncell to stack

- Follow-up to ea34b80
- It is now possible to stack 0x1|0x2 as a valid flag value.

Signed-off-by: Haru <haru@dotalux.com>
Fix possible memory overflows and underflows.
Add some missing null pointer checks after automatic checks.
Remove useless checks.
fix typo in inter.c in initerface initialisation.
Fix wrong useless cycle added in commit c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.
Fix checking result from function TryEnterCriticalSection.
fix wrong check.
add comment about possible error.
Improve performance a bit by removing strlen(str) > 0.