Implement automatic reply/event/error dispatching

Rather than writing out the reply/event/error dispatch switch cases by
hand every time a new extension is introduced, the dispatching is now
done by the extensions themselves. When a class containing request
function is loaded by the ClassLoader, the corresponding dispatchers are
added to the extension dispatching map by the static initializer. Since
the dispatchers are only needed in response to requests, the request
functions class is the ideal place to initialize the dispatchers.

This change is also necessary because the old dispatch switch cases
lives in the core module, which cannot depend on the extension module
due to circular dependency. To get around this problem, the dispatching
is moved to the protocols themselves, and the core needn't concern
itself with how the dispatching takes place.
Regenerate all protocols

Regenerate all protocols with the automatic dispatching initialization.
Only add valid event/error code to extension map

Only add valid event/error code to extension map, skipping
invalid/non-existent ones.