extend C module API with engine access
Right now C modules have no way to access struct engine->net
in their non-property methods. Engine can be accessed only from property methods, which is very inconvenient for modules without properties.
It can be worked around using trick like this, but it's ugly:
dot_enable(void *env, struct kr_module *module, const char *args) {
module->data = env;
}
and calling this from config using:
modules.load('dot')
dot.enable()
I think we should extend the API in way which provides access to engine from all methods. Maybe we could add engine pointer to struct kr_module or something like that.