HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
similar question do you need both variants ?
```
int compareScopesByName(IHqlScope * left, IHqlScope * right)
int compareScopesByName(IInterface * * pleft, IInterface * * pright)
```