Enable converting bitfield structs to int/long values

Add methods to convert each type of bitfield struct to its corresponding int or long bitfield mask. Add some tests.

Depends on https://github.com/foursquare/spindle/pull/1, because the tests do not pass until that fix goes in.