Move bit_length function from rsa to utils

So far the function is used in RSA and DSA so as @public pointed out, it's more sensible to have it in utils.