Issue #3439: add bit_length method to int and long.