Remove no-longer-necessary forward declarations

Although the diff is unreadable, this change simply deletes the forward declarations, and moves the function definitions to where the declarations previously were.  The diff is readable using the --patience algorithm.