feat(kernel/environment): add for_each method for traversing environment declarations

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
feat(library/kernel_bindings): expose environment::for_each method in the Lua API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): rename definition class to declaration

The name was misleading since not every declaration is a definition.

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