Consensus: extracted repeated code into _BitString.from_bool, _clade_to_bitstr,
_tree_to_bitstrs

Also tightened some code, edited docstrings, removed some trailing whitespace.

majority_consensus is still nondeterministic in that the resulting tree is
sometimes rooted differently. Unclear why this happens.
majority_consensus: ensure stable ordering so output tree is always the same.

This fixes an intermittent unittest failure caused by nondeterministic dict
iteration on Python 3. (On Python 2.X, dict iteration order is arbitrary but
stable, so the resulting consensus tree was always the same.)