Allocate sufficiently large storage arrays for endpoints

This fixes an index-out-of-bounds error reported in PR #93.
Merge pull request #95 from bska/allocate-endpoint-arrays

Allocate sufficiently large storage arrays for endpoints. Merging this as it is a fix for a critical bug.
Added funtions for upscaling net porosity and NTG in UpscalerBase
Added upscaling of NTG and net porosoty in cpchop
Added forgotten if on NTG output
cpchop refactored to allow multithreading
updates for ntg
simpler data structures