Fix Issue 12027 - Iterate set bits in BitArray.

Also adds:
- countTrailingZeros(v)
- countBitsSet(v)
- bitsSet(v)

Notes:
- There is a `popcnt` function in `core.bitops`, but it only works with `int`.
- `bitsSet(v)` could be a bidirectional and possibly even random access range, but I'll leave that for future work for now.
Performance improvements for dense BitArray.bitsSet.
Reimplement countTrailingZeros using bsf.
Refine BitArray.init requirements and docuemntation.
Mark countBitsSet and countTrailingZeroes as private for now
Merge pull request #1901 from Poita/bug12027

Fix Issue 12027 - Iterate set bits in BitArray.
Fix Issue 12245 - BinaryHeap expensive in -debug

https://d.puremagic.com/issues/show_bug.cgi?id=12245
Merge pull request #1976 from Poita/bug12245

Fix Issue 12245 - BinaryHeap expensive in -debug