Because I structured the core debug loop differently from your original patch, I'm mostly re-writing your patch rather than doing a straight merge, although I'm heavily referring to your patch in the process. I do plan to credit your original patch when I commit though. Would appreciate some feedback since you've already gone through all this learning before. I'm doing this in small pieces rather than all at once, so there's still many pieces of your patch which are not here yet.
This particular piece sends notifications for module load / unload to the process plugin, and also fixes some issues managing the state more accurately during the loading sequence.
Not yet implemented: any kind of thread management, dynamic loader plugin, attaching to processes, breakpoint management other than getting the low level exception, or stepping.