Added helper furnctions for resetting AHB and APB peripherals.
Attempted to change how some of the more complex clocks are managed,
but the code failed.  I'm keeping the code I added in for now, even
though it isn't used.  I'll need to decide whether to try to fix
what isn't working or move in another direction.