Nativeint pointers

[Currently lots of commits here, since the branch builds on #175.  162ef82 is the commit to look at.]

Fixes #174.