Move debug methods to 'utils.lua'

Note: REPL docs are not installed when they're in init.lua
Fail more gracefully on missing rockspec
Add docs for public functions