Tidy up Result (@stephanh suggestions)

- Formatting changes (indentation, no lines longer than 100 characters).
- Add return types to methods.
- Use scala.util.control.NonFatal to screen exceptions.
- Rename throwIfError to unsafeGet.
- Add scaladoc.