Add bitset implementation.

    Ported from libds.