HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Now just 2 - or possibly 1 in this case.  I kept the variants so I could switch between the implementations.