refine tests of nth_bit
rename bit1_count and bit0_count to count_bit1 and count_bit0
rename nth_bit to bit_at