Add resample_segment()

* building block for new resample.neuron function
failing test
Fix resample_segment for data.frame and ncol>3

* tests now pass
Handle interpolation of integers and factors

* Ensure resample_segment returns data.frame
* this is required to ensure that integers or factors are handled appropriatley
test data should have integer label col
ensure that we get back data.frame

* even when only 1 row returned
cope with >3 cols

* i.e. when W or Label supplied
handle NA columns

* and tests for recent changes
Corrected version of resample.neuron

* simplified
* works on W and Label columns as well
* based on resample_segment which has been tested carefully now
* issues:
  * segments of length 2 never resampled
  * segment order can be changed (by as.neuron?)
  * handling of origin (especially if not a branch/end point)
should be able to resample segment of length 2
don’t expect a warning when resampling multi-trees
Fix segment ordering when resampling
Keep origin when resampling with nTrees > 1

* and test for this behaviour 
* and additional tests for branch point identity
* closes #185
Merge branch 'fix/resample-neuron'

* closes #166 and #185
* fix/resample-neuron:
  Keep origin when resampling with nTrees > 1
  Fix segment ordering when resampling
  don’t expect a warning when resampling multi-trees
  should be able to resample segment of length 2
  Corrected version of resample.neuron
  handle NA columns
  cope with >3 cols
  ensure that we get back data.frame
  test data should have integer label col
  Handle interpolation of integers and factors
  Fix resample_segment for data.frame and ncol>3
  failing test
  Add resample_segment()