HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Define a SELF but using this-> in places below.
Don't know either better, I tend to use a SELF::