Fix build and linking issues with the module

- Add missing headers.
- Use sbufs for strings (silly me for always programming in userland)
- Rename sysctl tree to test to make progress until I figure out the
  proper formula for sysctl(9) to populate properly without resulting
  in runtime linker errors
- Finish off module definition
- Fix some typos in function/macro calls

Sponsored-by: EMC / Isilon Storage Division