add seed function to generate master privkey

This follows the spec of BIP32. With tests for main test vectors.