refactor: separate packages

Stamp is using ID and event functionality which is moved to subpackages.
Tooling stuff like the bitpacker and -unpacker is moved to a subpackage too.
Fix types - using uint32 instead of int (and cast internaly).