Added testSerialize() methods

added testSerialize() to WatcherTest, BinLeafNodeTest, and
BinInternalNodeTest.
Also resulted in fixes in the serialize methods for Watcher,
BinLeafNode, and BinInternalNode