Add numSegments() and numSynapses() to Connections

Fixes https://github.com/numenta/nupic.core/issues/226.
Perhaps `UInt8` is a better type for this? Also, is it true that `0 <= SegmentIdx < 256`?