fix left shift bug that happens if p >= sp
be explicit about order of operations
set the sparse set threshold based on the number of bits used for the dense representation
make threshold final
add basic validation of constructor args
Merge pull request #20 from seancarr/master

fix two small bugs in encodeHash