Add SGFSError structure for native error handling

- SGFSError contains an error and a string for detail error reporting.
- Modify a few APIs that used to return error, now it is enclosed
  inside the SGFSError structure.
- Future return type changes should be modified lazily, i.e., change as
  we see fit.