better handling of doubles between Octave and Python

passed using exact hex format instead of imprecise strings.  Some fallout from this, in particular with indexing.  This commit also wraps the places I've found in int32().  But there might be more.