types of changes:
- Add a few new methods to replace stuff like p_find(), CPU_INFO_FOREACH.
- Use db_read_bytes() instead of accessing kernel structures directly,
and similar changes.
- Add ifdef _KERNEL where the above hasn't been done, and an XXX comment.
Make some variables and functions static when not used outside of a module.
Make variables in headers extern.
Delete the unused db_find_watchpoint() function.