Event machine API functions return uint32_t

Originally these functions defined their return types as enum EM_result.
This let compiler decide how the result will be stored, but normally
user wants to know how these values are stored and so this patch
provides that.