Add numSegments() and numSynapses() to Connections

Fixes https://github.com/numenta/nupic.core/issues/226.
There's no `UInt8` defined anywhere. And we want to limit the number of segments, so yes. However, the logic for reusing segments isn't there yet, so I added a TODO to assert on the segment index.