Added tables that store event access interfaces and event states per
interface, as well as functions which allow events to be retrieved:
* events.interfaces lists access interfaces,
* events.unprocessed_events lists events which haven't been processed
for each type of interface, with a "pre-processed" flag
* events.ep_read() is a set of function variants which will read events
* events.ep_access() is a set of function variants which read events
then update their states.