Move functionality into crane package

This will make it easier to use Crane as a library from other
tools and it also makes the generated GoDoc much better as GoDoc
does not document the main package.
Run tests before releasing
Use t.Error if formatting is not needed
Add GoDoc badge