Refactor married keychains

* move handling of following keychains into the leading keychain
* move multisig threshold into the leading keychain
Good point.  Added bits to the random() call, and added a convenience function if people want to use the default bits.