Reorganize for rustdoc, etc.

The rustdoc tool needs the enum/struct to be visibile in order to generate
documentation for the impl. I looked at some internal flags and there may be a
way to override this behavior but it seems better to just provide a public
wrapper (newtype) struct around the internal interface and put the impl on top
of that instead of the enum. This makes some parts from doc public but only
within the crate. The crate user still only has access to what we export from
the lib mod.
Add links to docs