Misc. bitset extensions and bug fixes

Thanks for developing this package! I am making some pretty heavy use of it. Anyway, I made some bug fixes and added some features; details are in the commit logs. I hope the new features will be of general interest.

-- Eric