Made raw/owned fields private

* Removed `pub` modifier from these fields
* Implemented accessors for these fields where appropriate
* Implemented `new_from_raw` unsafe constructors because they are
  sometimes needed