HPCC-12708 Optimize jset and provide countTrailingZeros() helpers

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
I'm still unconvinced.

'countLeadingZeros' is currently unused.
and 'countTrailingZeros' is used to scan for the LSB in a bit set (of bits_t)

countTrailingZeros is equivalent to 'find least significant [set] bit'.
I agree the countLeadingZeros isn't the same as 'find most significant bit', but a findMSB could be made to be,
i.e. 
```
inline unsigned countLeadingZeros(unsigned value)
{
    dbgassertex(value != 0);
#if defined(__GNUC__)
    return sizeof(unsigned)-(__builtin_clz(value)+1); // if 'value==0' is undefined, then ok.
...
```

**Also the WIN32 version, _BitScanReverse, is not equivalent.**
It _does_ return the position of the MSB, not the count.
The example in the manual is:
Mask: 12 Index: 3
Whereas __builtin_clz would return 28