Moving submap event processing into two different source files

submap_event.h and submap_event.c

The only function visible to the rest of the code is
submap_dispatch_event(), the rest are static inside submap_event.c where
submap_dispatch_event is defined.