HPCC-12708 Optimize jset and provide countTrailingZeros() helpers

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Technically all these *8's should be *BITS_PER_BYTE I think - which while it's unlikely to have any impact on portability might make the code easier to follow?