corex: fixed for loop in previous commit
core: allow up to three callback functions for net_data_in and net_data_out

- they are added normal for net_data_in and reverse for net_data_out,
  allowing nested execution (e.g., first module registering the two
  callbacks with have the first net_data_in and the last net_data_out)
- allow topoh module can be used with other functionalities needed the same
  callbacks
core: proper reverse order execution for net_data_out event callbacks